• +91 9723535972
  • info@interviewmaterial.com

Asp.Net Interview Questions and Answers

Asp.Net Interview Questions and Answers

Question - 31 : - What are user controls and custom controls?

Answer - 31 : -   Custom controls:  A control authored by a user or a third-party software vendor that does not belong to   the .NET Framework class library. This is a generic term that includes user controls. A  custom server control is used in Web Forms (ASP.NET pages). A custom client control is used  in Windows Forms applications. User Controls: In ASP.NET: A user-authored server control that enables an ASP.NET page to be re-used   as a server control. An ASP.NET user control is authored declaratively  and persisted as a  text file with an .ascx extension. The ASP.NET page framework compiles a user control on  the fly to a class that derives from the        System.Web.UI.UserControl class.

Question - 32 : - What are the validation controls?

Answer - 32 : -   A set of server controls included with ASP.NET that test user input in HTML and Web server  controls for programmer-defined requirements. Validation controls perform input checking in server code. If the user is working with a browser that supports DHTML, the validation  controls can also perform validation using client script.

Question - 33 : - What's the difference between Response.Write() andResponse.Output.Write()?

Answer - 33 : - latter one allows you to write formattedoutput.

Question - 34 : - What methods are fired during the page load? Init()

Answer - 34 : -  When the page is instantiated, Load() - when the page is loaded into server  memory,PreRender () - the brief moment before the page is displayed to the user  as HTML, Unload() - when page finishes loading.

Question - 35 : -  Where does the Web page belong in the .NET Framework class hierarchy?

Answer - 35 : - System.Web.UI.Page

Question - 36 : - . What's the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode.aspx.cs"?

Answer - 36 : -   CodeBehind is relevant to Visual Studio.NET only.

Question - 37 : - . What's a bubbled event?

Answer - 37 : -   When you have a complex control, likeDataGrid, writing an event processing routine for each object (cell, button,row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents. Suppose you want a certain ASP.NET function executed on MouseOver over a certain button.

Question - 38 : - . Where do you add an event handler?

Answer - 38 : - It's the Attributesproperty, the Add function inside that property. e.g. btnSubmit.Attributes.Add("onMouseOver","someClientCode();")

Question - 39 : - What data type does the RangeValidator control support?<

Answer - 39 : - Integer,String and Date.

Question - 40 : - What are the different types of caching?

Answer - 40 : -   Caching is a technique widely used in computing to increase performance by keeping frequently accessed or expensive data in memory. In context of web application, caching is used to retain the pages or data across HTTP requests and reuse them without the expense of recreating them. ASP.NET has 3 kinds of caching strategies Output Caching, Fragment Caching, Data Caching.


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners