What are the different states in ASP.NET?
There are three types of state:
1. View state: Under the client-side state managment.The ViewState property provides a dictionary object for retaining values between multiple requests for the same page. When an ASP.NET page is processed, the current state of the page and controls is hashed into a string and saved in the page as a hidden field.
2. Application state:Under the server side state managment. ASP.NET allows you to save values using application state, a global storage mechanism that is accessible from all pages in the Web application. Application state is stored in the Application key/value dictionary.
3. Session state:Under server side state managment . ASP.NET allows you to save values using session state, a storage mechanism that is accessible from all pages requested by a single Web browser session.Reply
WE cant use them togather,since compiler are different.Reply
What is GAC and name of the utility used to add an assembly into the GAC ?
GAC(Global Assembly Cache) for an effective sharing of assemblies.GAC refers to the machine-wide code cache in any of the computers that have been installed with common language runtime.Global Assembly Cache in .NET Framework acts as the central place for private registering assemblies.
"gacutil.exe" utility used to add assembly in GACReply
What is the Purpose of System.Collections.Generic ?
For more safty and better performance strongly typed collections are useful for the user. System.Collections.Generic having interfaces and classes which define strongly typed generic collections.Reply
What is the use of Global.asax File in ASP.NET Application ?
The Global.asax file, can be stored in root directory and accesible for web-sites,is an optional file.This Global.asax file contained in HttpApplicationClass.we can declare global variables like variables used in master pages because these variables can be used for different pages right.Importent feature is that its provides more security in comparision to other.
It handle two event:
Global.asax File itself configured but it can not be accessed.while one request is in processing it is impossible to send another request, we can not get response for other request and even we can not start a new session.
while adding this Global.asax file to our application by default it contains five methods,
Those methods are:
What is the Default Expiration Period For Session and Cookies,and maximum size of viewstate?
The default Expiration Period for Session is 20 minutes.
The default Expiration Period for Cookie is 30 minutes.
The maximum size of the viewstate is 25% of the page sizeReply
Difference between Session object and Profile object in ASP.NET?
1. Profile object is persistent.
2. Its uses the provider model to store information.
3. Strongly typed
4. Anonymous users used mostly.
1. Session object is non-persistant.
2. Session object uses the In Proc, Out Of Process or SQL Server Mode to store information.
3. Not strongly typed.
4. Only allowed for authenticated users.Reply
What are the two levels of variable supported by Asp.net?
1. Page level variable:String ,int ,float.
2. Object level variable:Session level, Application level.Reply
Explain the aim of using EnableViewState property?
When the page is posted back to the server, the server control is recreated with the state stored in viewstate.It allows the page to save the users input on a form across postbacks. It saves all the server side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser. Reply
Why the exception handling is important for an application?
Exception handling prevents the unusual error in the asp.net application,when apllication executed.If the exceptions are handled properly, the application will never get terminated abruptly.Reply