.NET - ASP.NET

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

102.
What events are fired when a page loads?
The following events fire when a page loads:
  • Init() - Fires when the page is initializing.
  • LoadViewState() - Fires when the view state is loading.
  • LoadPostData() - Fires when the postback data is processing.
  • Load() - Fires when the page is loading.
  • PreRender() - Fires at the brief moment before the page is displayed to the user as HTML.
  • Unload() - Fires when the page is destroying the instances of server controls.

103.
Write three common properties of all validation controls.
Three common properties of validation controls are as follows:
  • ControlToValidate - Provides a control to validate
  • ErrorMessage - Displays an error message
  • IsValid - Specifies if the control's validation has succeeded or not
  • Text - Displays a text for validation control before validation

104.
What are navigation controls? How many navigation controls are there in ASP.NET 4.0?
Navigation controls help you to navigate in a Web application easily. These controls store all the links in a hierarchical or drop-down structure; thereby facilitating easy navigation in a Web application.

There are three navigation controls in ASP.Net 4.0.
  • SiteMapPath
  • Menu
  • TreeView