April 30, 2013

ASP.NET Interview Questions and Answers

What is difference between a Label control and a Literal control?
Ans- The Label control's final html code has an HTML tag; whereas, the Literal control's final html code contains only text, which is not surrounded by any HTML tag.



What is the difference between ASP session and ASP.NET session?
Ans- ASP does not support cookie-less sessions;
whereas, ASP.NET does. In addition, the ASP.NET session can span across multiple servers.


What is the use of the <sessionState> tag in the web.config file?
Ans- The <sessionState> tag is used to configure the session state features. To change the default timeout, which is 20 minutes, you have to add the following code snippet to the web.config file of an application: <sessionState timeout="40"/>


Which class is inherited when an ASP.NET server control is added to a Web form?
Ans- The System.Web.UI.WebControls class is inherited when an ASP.NET server control is added to a Web form.


How many types of Cookies are available in ASP.NET?
Ans- There are two types of Cookies available in ASP.NET:

  • Session Cookie - Resides on the client machine for a single session until the user does not log out.
  • Persistent Cookie - Resides on a user's machine for a period specified for its expiry, such as 10 days, one month, and never.
The user can set this period manually.

What are Web server controls in ASP.NET?
Ans- The ASP.NET Web server controls are objects on the ASP.NET pages that run when the Web page is requested. Many Web server controls, such as button and text box, are similar to the HTML controls. In addition to the HTML controls, there are many controls, which include complex behavior, such as the controls used to connect to data sources and display data.
What type of the CatalogPart control enables users to restore the Web Parts that have been removed earlier by the user?
Ans- The PageCatalogPart control.

0 comments:

Post a Comment

  • Blogger news

    This Blog Contains All Topics Related To Internet, Website Help, Interview Questions, News, Results From Various Resources, Visit Daily For More Interesting And Famous Topics.
  • Random Post

  • About

    We Provide All Information Which you Needed. We Maintain This Blog Very Carefully, If You Find Any Mistake or Any Suggestions Then Please Let Us Know, You Can Contact Us By Comments, On FB Page Or On Google+ Page. ~ Thank You