Asp.Net interview Questions and Answers Part 10

By
1.) How to disable client side script in validation controls ?                                         
Set property "EnablclientScript"='false'

2.) What are the advantage of asp.net ?                                                                              
  • It is used to develop simpler and easier applications.
  • It is used to develop dynamic application using c#.
  • It provides security to the asp.net applications such as Windows authentication , Passport authentication,Form based authentication etc.
  • It is easily manage two files such as Design Form,Logic file or code file in any asp.net application.
  • It provides Built-in caching features also.
3.) Is Global.asax is used to handle the session and application state  ?                
Yes.

4.) How to allow automatic paging in GridView ,DataList and Repeater               controls ?
Set Property of each control :-Allow Paging='true'.

5.) Which file is Known as configuration file in asp.net ?                                              
Web.config file

6.) What is web user control in asp.net ?                                                                            
Web user control is a set of control which can be used more than one web pages.We can specify that set of control in form of web user control.We can easily change the value of a control specify in web user control on the page.
Ex. you can change user control values when any user redirect to another web page like this:-
protected void page_Load
{
((Lable)Webusercontrol 1 .find("Label1")).Text = "Hello";


7.) What is Master page in asp.net ?                                                                                      
If there is such a content which will remain same on top,Bottom,Left,Right Portion of more than web pages.We can specify those contents in form of Master page. We can use more than one master page in an application.We can use Nested master page in an application also. 

8.) What is the use of ContentPlaceHolder in Master page ?                                        
This acts as a place where every page will specify its own contents.The extension of master page is .master.

9.) Can we Run Master page independently in asp.net ?                                                
We can't run master page independently in asp.net.

10.) What is difference between master page and web user control in asp.net ? 
Master page:-
  1. It uses extension  .master.
  2. It is used like a template.
  3. It contains content ContentPlaceHolder .
Web User Control:-
  1. It uses extension .ascx
  2. It can be more than one of a single web page
  3. It does not contain any ContentPlaceHolder.
  4. It does not work like a fixed template.It can be display in different manner in different pages.
11.) which is used mostly in real life,master page or web user control  ?                 
Both techniques are goods on your place but Master page is using mostly in our asp.net real application.

0 comments:

Post a Comment

Powered by Blogger.