14 July 2011

interview questions .Net : State Management

Q. Define state management in ASP.NET.
Answer: State management is implemented in order to retain information about the user requests. Web pages are stateless. Each request creates new page without retaining any previous information about the user requests. ASP.NET supports several State management techniques to maintain state information.
 State management in ASP.NET can be classified into
•         Client-side state management
•         Server-side state management
Contributed by Keerthy C

Q.What is Session Identifier?

Answer: Session Identifier is used to identify session. It has SessionID property. When a page is requested, browser sends a cookie with a session identifier. This identifier is used by the web server to determine if it belongs to an existing session. If not, a Session ID (120 - bit string) is generated by the web server and sent along with the response.


Q.What are the Session State Modes? Define each Session State mode supported by ASP.NET.

Answer: ASP.NET supports three Session State modes.
•         InProc
•         State Server
•         SQL Server


Q. What is a ViewState?
Answer: Viewstate is used to maintain or retain values on postback. It helps in preserving a page. Viewstate is internally maintained as a hidden field in encrypted form along with a key.


Q. What is a Session?
Answer: A Session is a unique instance of the browser. A single user can have multiple instances of the browser running on his or her machine. If each instance visits your Web application, each instance has a unique session.A session starts when a user accesses a page on a Web site for the first time, at which time they are assigned a unique session ID. The server stores the user's session ID in the Session.SessionID property.

Q.What are Application State variables?
Answer: Application State variables are global variables that are available from anywhere in the application. All Sessions can access Application State variables.

Q. What are Cookies in ASP.NET?
Answer: Cookies are small pieces of information stored on the client computer.Use cookies to store small amounts of information on the client’s machine. Web sites often use cookies to store user preferences or other information that is client-specific. Because cookies can be refused, it is important to check whether the browser allows them before you try to create them.They are limited to storing only character data and they are limited to 4K in size.

For the latest IT jobs visit  www.ipsrjobs.com 

No comments:

Post a Comment