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.
Questions
String mystring; Creates a(n)
- Class
- Constructor
- Object
- a and b
interfaces represent concrete types that convey implementation details such as fields and method implementations.
- True
- False
Which one of the following keywords causes a compile time error if used in a static method?
- this
- using
- lock
- continue
The CLR uses which format for assembly version numbers?
- Major:Minor:Revision:Build
- Major:Build:Minor:Revision
- Major:Revision:Minor:Build
- Major:Minor:Build:Revision
C# language does not support
- multiple inheritance
- interface
- abstract
- None of the above
Which one is faster? response.redirect or server.transfer
- Server.Transfer
- Response.Redirect
- All the above
- None of the above
alternative of multiple inheritance in c#?
- Interface
- abstract class
- static class
- All the above
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?
- <%@ Page Debug="true" %>
- <%@ Application Debug="true" %>
- <%@ Page Trace="true" %>
- <%@ Application Trace="true" %>
What ASP.NET object encapsulates the user’s data as it is sent from a form in a page?
- The Session object.
- The Application object.
- The Response object.
- The Request object.
What ASP.NET object is used to get information about the web servers hostname?
- The Session object.
- The Application object.
- The Response object.
- The Server object
What ASP.NET object encapsulates the state of the client and the browser?
- The Session object.
- The Application object.
- The Response object.
- The Request object.
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?
- The Click event.
- The SelectionChanged event.
- The SelectedIndexChanged event.
- The ChangedSelection event.
What is the use of the WebForm.aspx.cs file?
- Holds the HTML code for the form.
- Holds the control configuration for the form.
- Holds the C# code for the codebehind module.
- Holds the C# code that will be translated into HTML on the client.
What is the Web.config file used for?
- To store the global information and variable definitions for the application.
- Configures the time that the server-side codebehind module is called.
- To configure the web server.
- To configure the web browser.
What happens if an ASP.NET server control with event-handling routines is missing the runat="server" attribute from its definition?
- The control will operate as usual; the default is runat="server"
- The control will revert to being a client-side control and function as such.
- The control will not function; the default is runat="client".
- The compilation of the application will fail.
After capturing the SelectedIndexChanged event for a ListBox control, you find that the event handler doesn’t execute. What could the problem be?
- The AutoEventWireup attribute is set to False.
- The AutomaticPostBack attribute is set to False.
- comThe codebehind module is not properly piled.
- The ListBox must be defined WithEvents.
What is used to validate complex string patterns like an e-mail address?
- Extended expressions
- Regular expressions.
- Irregular expressions.
- Basic expressions.
You need to customize the error messages from your web application. What file will you modify to customize the error messages?
- Web.config
- Error.config
- Application.config
- global.asax
If you want to ask the user to select between two or more mutually exclusive options, you would employ which of the following controls?
- TabControl
- Button
- RadioButton
- CheckBox
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?
- System.UInt16
- int
- System.String
- System.IntPtr