ASP.NET Web Forms and C# Fundamentals

Test your knowledge of ASP.NET web forms, server controls, configuration files, and C# programming concepts used in web development.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

String mystring; Creates a(n)

  1. Class
  2. Constructor
  3. Object
  4. a and b
Question 2 True/False

interfaces represent concrete types that convey implementation details such as fields and method implementations.

  1. True
  2. False
Question 3 Multiple Choice (Single Answer)

Which one of the following keywords causes a compile time error if used in a static method?

  1. this
  2. using
  3. lock
  4. continue
Question 4 Multiple Choice (Single Answer)

The CLR uses which format for assembly version numbers?

  1. Major:Minor:Revision:Build
  2. Major:Build:Minor:Revision
  3. Major:Revision:Minor:Build
  4. Major:Minor:Build:Revision
Question 5 Multiple Choice (Single Answer)

C# language does not support

  1. multiple inheritance
  2. interface
  3. abstract
  4. None of the above
Question 6 Multiple Choice (Single Answer)

Which one is faster? response.redirect or server.transfer

  1. Server.Transfer
  2. Response.Redirect
  3. All the above
  4. None of the above
Question 7 Multiple Choice (Single Answer)

alternative of multiple inheritance in c#?

  1. Interface
  2. abstract class
  3. static class
  4. All the above
Question 8 Multiple Choice (Single Answer)

You have been asked to debug a Web-based ASP.NET application. For some reason, the debugging information is not presented. What could be missing?

  1. <%@ Page Debug="true" %>
  2. <%@ Application Debug="true" %>
  3. <%@ Page Trace="true" %>
  4. <%@ Application Trace="true" %>
Question 9 Multiple Choice (Single Answer)

What ASP.NET object encapsulates the user’s data as it is sent from a form in a page?

  1. The Session object.
  2. The Application object.
  3. The Response object.
  4. The Request object.
Question 10 Multiple Choice (Single Answer)

What ASP.NET object is used to get information about the web servers hostname?

  1. The Session object.
  2. The Application object.
  3. The Response object.
  4. The Server object
Question 11 Multiple Choice (Single Answer)

What ASP.NET object encapsulates the state of the client and the browser?

  1. The Session object.
  2. The Application object.
  3. The Response object.
  4. The Request object.
Question 12 Multiple Choice (Single Answer)

When working with ASP.NET server controls, it is important to use the right event handlers to capture the event for the application to function properly. What event would you use to capture the selection of a new item in a DropDownList control?

  1. The Click event.
  2. The SelectionChanged event.
  3. The SelectedIndexChanged event.
  4. The ChangedSelection event.
Question 13 Multiple Choice (Single Answer)

What is the use of the WebForm.aspx.cs file?

  1. Holds the HTML code for the form.
  2. Holds the control configuration for the form.
  3. Holds the C# code for the codebehind module.
  4. Holds the C# code that will be translated into HTML on the client.
Question 14 Multiple Choice (Single Answer)

What is the Web.config file used for?

  1. To store the global information and variable definitions for the application.
  2. Configures the time that the server-side codebehind module is called.
  3. To configure the web server.
  4. To configure the web browser.
Question 15 Multiple Choice (Single Answer)

What happens if an ASP.NET server control with event-handling routines is missing the runat="server" attribute from its definition?

  1. The control will operate as usual; the default is runat="server"
  2. The control will revert to being a client-side control and function as such.
  3. The control will not function; the default is runat="client".
  4. The compilation of the application will fail.
Question 16 Multiple Choice (Single Answer)

After capturing the SelectedIndexChanged event for a ListBox control, you find that the event handler doesn’t execute. What could the problem be?

  1. The AutoEventWireup attribute is set to False.
  2. The AutomaticPostBack attribute is set to False.
  3. comThe codebehind module is not properly piled.
  4. The ListBox must be defined WithEvents.
Question 17 Multiple Choice (Single Answer)

What is used to validate complex string patterns like an e-mail address?

  1. Extended expressions
  2. Regular expressions.
  3. Irregular expressions.
  4. Basic expressions.
Question 18 Multiple Choice (Single Answer)

You need to customize the error messages from your web application. What file will you modify to customize the error messages?

  1. Web.config
  2. Error.config
  3. Application.config
  4. global.asax
Question 19 Multiple Choice (Single Answer)

If you want to ask the user to select between two or more mutually exclusive options, you would employ which of the following controls?

  1. TabControl
  2. Button
  3. RadioButton
  4. CheckBox
Question 20 Multiple Choice (Single Answer)

You need to identify a type that meets the following criteria: ? Is always a number.? Is not greater than 65,535. Which type should you choose?

  1. System.UInt16
  2. int
  3. System.String
  4. System.IntPtr