Tag: asp

Questions Related to 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
  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

Why is Global.asax is used?

  1. Implement application and session level events

  2. Declare Global variables

  3. No use


Correct Option: A

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Implement application and session level events - This option is correct. The Global.asax file is used in ASP.NET applications to handle application-level events, such as Application_Start, Application_End, Session_Start, Session_End, etc. These events allow you to run code at specific points during the application's lifetime, such as initializing global variables, setting up database connections, or managing session variables.

Option B) Declare Global variables - This option is incorrect. While it is possible to declare global variables in the Global.asax file, it is not the primary purpose of this file.

Option C) No use - This option is incorrect. The Global.asax file serves a specific purpose in ASP.NET applications, as mentioned in Option A.

The correct answer is A) Implement application and session level events. This option is correct because the Global.asax file is primarily used to handle application-level events and manage session-related tasks.

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

  1. True

  2. False


Correct Option: A

What is the extension of a web user control file?

  1. .Asmx

  2. .Ascx

  3. .Aspx


Correct Option: B

AI Explanation

To answer this question, you need to understand the file extensions used in web development.

Option A) .Asmx - This option is incorrect because the .asmx extension is used for ASP.NET web services, not web user control files.

Option B) .Ascx - This option is correct. The .ascx extension is used for web user control files in ASP.NET. These files contain reusable UI components that can be added to web pages.

Option C) .Aspx - This option is incorrect because the .aspx extension is used for web forms in ASP.NET, not web user control files.

The correct answer is B) .Ascx. This option is correct because it represents the file extension of a web user control file in ASP.NET.

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
  1. Session Objects

  2. Application Objects

  3. Viewstate

  4. All of the above


Correct Option: D
  1. Output Caching

  2. DataCaching

  3. a and b

  4. none of the above


Correct Option: C