Asp.Net interview Questions and Answers Part 3

By
1.) Why we use Query String in asp.net 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 asp.net 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 asp.net?                                      
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 asp.net application.
 More Details..

3.) What is difference between Label and Literal control in asp.net?                 
  • 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 asp.net?                                                                              
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 asp.net?                                                      
  1. Machine.config
  2. Web.config
  3. Global.asax
7.) How to display Custom error in asp.net?                                                              
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.
Ex.
<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 asp.net page Life-cycle stages ?                                                      
There are some stage of asp.net page Life-Cycle stages which are given below:-
  • Page Request
  • Start 
  • Initialization
  • Load
  • Postback even handling
  • Rendering
  • Unload

9.) What are the asp.net 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 ?        
System.Web.UI.Control

0 comments:

Post a comment

Powered by Blogger.