Latest ASP.Net Interview Questions and Answers

Read Top ASP.Net Interview Questions and Answers Experienced, Freshers for Job Interview Quiz with Solutions.

How do you register JavaScript for webcontrols ?

We can register javascript for controls using <CONTROL -name>Attribtues.Add(scriptname,scripttext) method.

In which event are the controls fully loaded?

Page load event.

What is boxing and unboxing?

Boxing is assigning a value type to reference type variable.

Unboxing is reverse of boxing ie. Assigning reference type variable to value type variable.

Differentiate strong typing and weak typing

In strong typing, the data types of variable are checked at compile time. On the other hand, in case of weak typing the variable data types are checked at runtime. In case of strong typing, there is no chance of compilation error. Scripts use weak typing and hence issues arises at runtime.

How we can force all the validation controls to run?

The Page.Validate() method is used to force all the validation controls to run and to perform validation.

List all templates of the Repeater control.

  • ItemTemplate

  • AlternatingltemTemplate

  • SeparatorTemplate

  • HeaderTemplate

  • FooterTemplate

List the major built-in objects in ASP.NET?

  • Application

  • Request

  • Response

  • Server

  • Session

  • Context

  • Trace

What is the appSettings Section in the web.config file?

The appSettings block in web config file sets the user-defined values for the whole application.

For example, in the following code snippet, the specified ConnectionString section is used throughout the project for database connection:



<add key=“ConnectionString” value=“server=local; pwd=password; database=default” />


Which data type does the RangeValidator control support?

The data types supported by the RangeValidator control are Integer, Double, String, Currency, and Date.

What is the difference between an HtmlInputCheckBox control and an HtmlInputRadioButton control?

In HtmlInputCheckBoxcontrol, multiple item selection is possible whereas in HtmlInputRadioButton controls, we can select only single item from the group of items.

Which namespaces are necessary to create a localized application?



What are the different types of cookies 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.

What is the file extension of web service?

Web services have file extension .asmx..

What are the components of ADO.NET?

The components of ADO.Net are Dataset, Data Reader, Data Adaptor, Command, connection.

What is the difference between ExecuteScalar and ExecuteNonQuery?

ExecuteScalar returns output value where as ExecuteNonQuery does not return any value but the number of rows affected by the query. ExecuteScalar used for fetching a single value and ExecuteNonQuery used to execute Insert and Update statements.


Popular posts from this blog

TOP Agile Testing Interview Questions and Answers

Latest Agile Testing Interview Questions and Answers

Most Asked ADO.NET Interview Questions and Answers