Interview questions with answers on Asp.net VOL. - I

Q.1  What is the basic difference between ASP.NET and ASP ?

Ans: ASP.NET is compiled; whereas,ASP is interpreted. ASP uses VBScript while ASP.NET uses .NET languages, such as C# and VB.NET, which are compiled to Microsoft Intermediate Language (MSIL).

 

Q.2  How can you identify that the Page is Post Back?

Ans: In ASP.NET page object has a property "IsPostBack" , it can be checked to know about the page posted back.

 

Q.3  What is meant by 3-tier architecture in ASP.NET.

Ans:  We generally divide our application in 3-Layers
1)Presentation Layer ( We keep all web forms Master Pages and User Controls in this layer).
2)Business Layer (We keep business logic in this layer such as Code related to manipulating data,Custom Control classes Login related code if any etc.)
3)Data Access Layer (We keep code used to interact with Database in this layer such as we can have the methods which are using SQL Helper)

 

Q.4  What are the types of validation controls available in asp.net?

Ans:
Range Validator
Compare Validator
Regular Expression Validator
Required Field validator
Custom Validator

Q.5  What is a DataReader object?

Ans:  It is an object that helps in retrieving the data from a database in a forward-only, read-only mode. The base class for all DataReader objects is DbDataReader class.


Q.6  Which template must you provide, in order to display data in a Repeater control? 

Ans:  ItemTemplate


Q.7  Which method needs to be invoked on the DataAdapter control to fill the generated DataSet with data?

Ans:  "Fill() " method is used to fill the dataset with data.


Q.8  What are different stages of ASP.Net Page Life cycle?

Ans:  Every ASP.Net Web page following stages/events
  •     Page Initialization (Page_Init event)
  •     Page Loading (Page_Load event)
  •     Page Prerender (Page_Prerender)
  •     Page Render (Page_Render)
  •     Page Unload (Page_Unload)

Q.9  Name some methods provided by the DataSet object to generate XML?

Ans:  Some methods provided by the DataSet object to generate XML are:
    ReadXml() - Reads XML document into a DataSet object.
    GetXml() - Returns a string containing an XML document.
    WriteXml() - Writes an XML data to disk. 



Q.10   Which property is used to check whether a DataReader is closed or opened?

Ans:  IsClosed .This property returns a true value if a Data Reader is closed, otherwise a false value is returned.


Q.11  What data type does the RangeValidator control support?

Ans:   Integer,String and Date.

Q.12  What is the differences between Server-side and Client-side code?

Ans:    Server-side code runs on the server while client-side code runs in the clients’ browser.

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Best Hostgator Coupon Code