ASP.Net Interview Questions and Answers for Freshers and Experience Part-17
98. What is the use of the <sessionState> tag in the web.config file?
The <sessionState> tag is used to configure the session state features. To change the default timeout, which is 20 minutes, you have to add the following code snippet to the web.config file of an application:<sessionState timeout=”40″/>
99. Can you post and access view state in another application?
Yes, you can post and access a view state in other applications. However, while posting a view state in another application, the PreviousPage property returns null.
100. Which method do you use to kill explicitly a users session?
The Session.Abandon() method kills the user session explicitly.
101. Which class is inherited when an ASP.NET server control is added to a Web form?
The System.Web.UI.WebControls class is inherited when an ASP.NET server control is added to a Web form.
102. What events are fired when a page loads?
The following events fire when a page loads:
Init() – Fires when the page is initializing.
LoadViewState() – Fires when the view state is loading.
LoadPostData() – Fires when the postback data is processing.
Load() – Fires when the page is loading.
PreRender() – Fires at the brief moment before the page is displayed to the user as HTML.
Unload() – Fires when the page is destroying the instances of server controls.