agriliner.blogg.se

Net oops interview questions and answers pdf
Net oops interview questions and answers pdf





net oops interview questions and answers pdf

  • TempData: It is a dictionary derived from the TempDataDictionary class.
  • View:: and ViewData span for a service call. It requires typecasting and null checks for complex data types.Ĭontroller:: ViewData = “Rasmita” View:: ViewData: It is a Dictionary object derived from the ViewDataDictionary class. Session Question 14: What are the various ways to send data from a controller to view? Session ID will remain the same in both of the cases as long as the browser is not closed. It still holds the SessionState and the resources associated with it. Session.Clear( ) just clears the session data (gives a null value to the session) without killing it.

    Net oops interview questions and answers pdf free#

    It releases the SessionState object and its items to free the resources. Session.Abandon() destroys the current session by firing a Session_End event. ~/Views/Shared/Home/Index.cshtml Question 13: Session.Abandon() vs Clear() If Home/Index is requested, views will be searched in the following order: Question 12: The default order in which the view is searched To process requests in a way different than the regular IIS way. Question 11: Why do we need HTTP handlers and models? Html helpers are like ASP controls, but these are lightweight. } Question 9: Name the ActionResults you know ReversedString.Append(" " + ReversedWord) StringBuilder ReversedWord = new StringBuilder() įor(int i=WordToReverse.Length-1  i>=0   i-)

    net oops interview questions and answers pdf

    StringBuilder WordToReverse = new StringBuilder() StringBuilder ReversedString = new StringBuilder() Ĭhar ArrStr = StringToReverse.ToCharArray() You can use ToCharArray().Īnswer private static string ReverseEachWord(string StringToReverse) Question 8: Write a method to reverse each word of a string without using predefined functions. This can be done by both AJAX and postback. You can cache the element on the page, process data on the user control, and then write the response on the cached element. The user will enter data and you need to validate this data and show valid/invalid data in a page. Question 7: You have a user control that has 2 fields. Session data is stored in a SQL Server database and kept centrally. Session data is stored in a separate machine. So session data is lost, when the server restarts. Session data is stored in the same machine as that of the server.

    net oops interview questions and answers pdf

    Question 6: What are the various session modes in ASP.NET? This way the session is maintained with SessionID. If cookieless is made true, sessionID is sent in the URL else the cookie file is sent.

    net oops interview questions and answers pdf

    This sessionID is sent to the server in all the subsequent requests. When a web app is requested for the first time, the server creates a sessionID and saves it in the cookie of the client browser. The Session_OnStart event in Global.asax can be used for tracking session-related information. A new session starts when the request doesn't contain any SessionID or the sessionID references an expired session. Question 4: When does a session actually start?Ī session actually starts when a visitor requests your site for the first time. If you want to learn more about SQL Joins, check out SQL Joins. When all records of both tables are expected. When matching records of the left table and all records of the right table is expected. When matching records of the right table and all records of the left table is expected. Again, outer join is of different types, depending on unmatching records of which table is expected. When we expect both matching and unmatching records of both tables, we need to join using an outer join. When you want only matching records of both tables, use inner join. But, for case 2 and case 3 union and union, all will behave differently. In case 1 both union and union will behave the same. Select name, id from Emp1 union all select name, id from Emp2 Select name, id from Emp1 union select name, id from Emp2 So union and union all will behave the same when each record is distinct in all the participating tables. Union all will give a record as many times as it occurs. Union will give a record only once even if it occurs several times. Question 2: When will union and union all behave the same?







    Net oops interview questions and answers pdf