Asp.Net interview Questions and Answers Part 3

1.) Why we use Query String in application?                                               
Query string is a method that store the state information on the client end If we want to send some information from the previous page to Next page then we use Query  strings in application.In this we can send the information as the Bar of URL by specifying'?'.
More Details..

2.) What is the purpose to use global.asax file in                                      
Global.asax file is used to maintain session and  application specific event within an application.We can have only one Global.asax file in a application.
 More Details..

3.) What is difference between Label and Literal control in                 
  • Literal and Label control both are used to display the text(information) on the web form.
  • On Browser side Label control is converted to HTML 'Span' tag but Literal control is not converted in any HTML tag.
  • We can provide formatting to the Label control but not to the Literal control.
  • If we want to show some HTML code and java script code the we used mainly Literal control ,not Label control.Encoding Mode is used with Literal control only.

4.) What is difference between Client side Caching and Server side Caching ? 
Client side Caching:- In client side scripting ,data comes from the client Browser which is stored in client's hard disk. 
Server side Caching:- In server side caching ,data comes from server cache memory.It is more faster because data comes from cache.

5.) What is Round Trip in                                                                              
Round trip is path which page follows:-
Web page goes to Client side -request(forward)-->Server side --response(back) --> Client Browser (Client side),is known as round trip. 

6.) What is three important file used in                                                      
  1. Machine.config
  2. Web.config
  3. Global.asax
7.) How to display Custom error in                                                              
We can display Custom error instead of showing Browser side  HTTP Error message to the client.We can specify Custom Error tag in web.config file.
<Custom Error Mode = "on" default Redirect=="CommanErrorapage.html"/>
<Error Status code = "403" redirect="NoAccess.html"/>
<Error Status code = "404" redirect="errorpage.html"/>
8.) What are the page Life-cycle stages ?                                                      
There are some stage of page Life-Cycle stages which are given below:-
  • Page Request
  • Start 
  • Initialization
  • Load
  • Postback even handling
  • Rendering
  • Unload

9.) What are the Life-cycle Events ?                                                             
  • PreInit
  • Init
  • InitComplete
  • PreLoad
  • Load
  • Control events
  • Load complete
  • preRender
  • preRenderComplete
  • SavestateComplete
  • Render
  • Unload

10.) What is the Namespace is used for Web Server control in ASP.NET ?        


Post a Comment

Powered by Blogger.