Following are the events occur during ASP.NET Page Life Cycle:
1)Page_PreInit
2)Page_Init
3)Page_InitComplete
4)Page_PreLoad
5)Page_Load
6)Control Events
7)Page_LoadComplete
8)Page_PreRender
9)SaveViewState
10)Page_Render
11)Page_Unload
Among above events Page_Render is the only event which is raised by page.
So we can't write code for this event.
when a browser made a request to the web server the same cookie is sent to
the server where server recognize the session id and get other information
stored to it previously.
will not allow the page to post back again n again bcoz it reduces the
performance.
you can reuse User control in the current project in which you have built it,
but you can't move it to other project as unless you just copy paste the same
file there and make the changes for that project ( which violets the concept of
library).
but custom control can be shared between projects. and you can precompile
them even as a dll, so this means you can use them in library of any type.
Application object resides in InProc i.e. on the same server where we hosted
our application.
Cache Object resides on server side/ DownStream/Client Side.
Only one user can access Application Object at a time hence we have to lock
it every time we modify it.
1) Page_PreInit
2) Page_Init
3) Page_InitComplete
4) Page_PreLoad
11. What is the difference between custom web user control and a
custom web server control?
Web User Control:
1) Easy to Create.
2) It Can be used inside the same Application.(To use it in other application
we need to add it to that project.)
3) It Can take advantage of Caching Technique.
In case of InProc Session Info will be stored inside the process where our
application is running.
In case of StateServer Session Info will be stored using ASP.NET State
Service.
In case of SQLServer Session info will be stored inside Database. Default DB
which will be created after running InstallSQLState Script is ASPState.
1)InProc
2)OutProc
InProc
Adv.:
1) Faster as session resides in the same process as the application
2) No need to serialize the data
DisAdv.:
1) Will degrade the performance of the application if large chunk of data is
stored
2) On restart of IIS all the Session info will be lost
State Server
Adv.:
1) Faster then SQL Server session management
2) Safer then InProc. As IIS restart
won't effect the session data
DisAdv.:
1) Data need to be serialized
2) On restart of ASP.NET State Service session info will be lost
3)Slower as compared to InProc
SQL Server
Adv.:
1) Reliable and Durable
2) IIS and ASP.NET State Service
restart won't effect the session data
3) Good place for storing large chunk of data
DisAdv.:
1) Data need to be serialized
2) Slower as compare to InProc and State Server
3)Need to purchase Licensed
version of SQL Serve
15. How do you design a website with multilingual support in ASP.NET?
Multilingual website can be created using Globalization and Localization.
To change the string which is there in the label button etc to language
specific string we use Localization.
Caching is of 3 types:
Output Caching - Caches the whole page.
Fragment Caching - Caches a part of the page
Data Caching - Caches the data
20. How can exception be handled with out the use of try catch?
using Exception Management application block
or
Page_error
Application_error objects
24. Is there any limit for query string? means what is the maximum
size?..
Servers should be cautious about depending on URI lengths above 255 bytes
because some older client or proxy implementations may not properly
support these lengths.