Tag: .net

Questions Related to .net

To add a custom control to a Web form we have to register with.

  1. TagPrefix

  2. Name space of the dll that is referenced

  3. Assemblyname

  4. All of the above


Correct Option: D

Custom Controls are derived from which of the classes

  1. System.Web.UI.Webcontrol

  2. System.Web.UI.Customcontrol

  3. System.Web.UI.Customcontrols.Webcontrol


Correct Option: C

How ASP.Net Different from classic ASP?

  1. Scripting is separated from the HTML, Code is interpreted seperately

  2. Scripting is separated from the HTML, Code is compiled as a DLL, the DLLs can be executed on server

  3. Code is separated from the HTML and interpreted Code is interpreted separately


Correct Option: B

AI Explanation

To answer this question, you need to understand the differences between ASP.Net and classic ASP. Let's go through each option to understand why it is correct or incorrect:

Option A) Scripting is separated from the HTML, Code is interpreted separately This option is incorrect because it describes the behavior of classic ASP, not ASP.Net. In classic ASP, the code and HTML are mixed together, and both are interpreted together.

Option B) Scripting is separated from the HTML, Code is compiled as a DLL, the DLLs can be executed on the server This option is correct. In ASP.Net, the code and HTML are separated, with code typically written in a separate file called a code-behind file. The code is then compiled into a DLL (Dynamic Link Library) file, which can be executed on the server. This separation allows for better organization and performance.

Option C) Code is separated from the HTML, and interpreted code is interpreted separately This option is incorrect because it is unclear and redundant. It is similar to Option A but adds the unnecessary phrase "interpreted code is interpreted separately."

The correct answer is B. This option correctly describes the behavior and key difference between ASP.Net and classic ASP, highlighting the separation of code and HTML and the compilation of code into DLLs.

  1. Response.Output.Write() allows you to flush output

  2. Response.Output.Write() allows you to buffer output

  3. Response.Output.Write() allows you to write formatted output

  4. Response.Output.Write() allows you to stream output


Correct Option: C
  1. Implement application and session level events

  2. Declare Global variables

  3. No use


Correct Option: A

There can be more than 1 machine.config file in a system

  1. True

  2. False


Correct Option: A

Which of the following is true?

  1. IsPostBack is a method of System.UI.Web.Page class

  2. IsPostBack is a method of System.Web.UI.Page class

  3. IsPostBack is a readonly property of System.Web.UI.Page class


Correct Option: C

The number of forms that can be added to a aspx page is.

  1. 1

  2. 2

  3. 3

  4. More than 3


Correct Option: A
  1. Session Objects

  2. Application Objects

  3. Viewstate

  4. All of the above


Correct Option: D