You want to display values of C# expressions in an ASPX page. Which of the
following types of code blocks would you use to enclose the expression in an ASPX file?
A -
<form>…</form>
B -
<script>…<scropt>
C -
<%=…%>
D -
<script runat= "server">…</script>
2-
You want to capture all exceptions that escape from the exception-handling
code in your application and log them to the system event log. You want a solution that
requires minimum coding efforts. Which of the following techniques would you use?
A -
Program the Page_Error() event handler of the Page class.
B -
Program the Application_Error() event handler in the global.asax file.
C -
Program the Page_Unload() event handler of the Page class.
D -
Program the Application_End() event handler in the global.asax file.
3-
You want to create a client-side event handler for the click event of a Button
Web server control. The client-side event handler is written in JavaScript and is executed
by the Web browser. The name of the Button control is btnSubmit, and the name of the
JavaScript event handler is GlowButton(). How should you accomplish this in your Web
form?
You want to keep consistent formatting for all the Web forms in your
application. To achieve this, you have created a CSS named styles.css and have linked it
to all the Web pages. You have defined a styles class named TextBoxStyle in style.css to
format text boxes onto the Web forms. Which of the following property settings would
you use with the TextBox Web server control to use the TextBoxStyle style class?
A -
CssClass=".TextBBoxStyle"
B -
Class="TextBoxStyle"
C -
CssClass="TextBBoxStyle"
D -
Class=".TextBoxStyle"
5-
Your company, StoreIt Inc has stored the text of serveral tjournals in a
Microsoft SQL Server database. Each sentence is stored in a separate record so that the
text can be retrieved with the finest granularity. Serveral of these works are many
thousands of printed pages in length.
You are building a Web application that will allow registered users to retrieve data from
these volumes.
When a user of your Web application requests large amounts of text, your application
must return it in the most efficient maner possible.
How should you build the large String object that is request to provide the most efficient
response to the user? (Select the best choise.)
A -
Use the StringBuilder class.
B -
Use the Append method of the String class.
C -
Use a Rich TextBox object to hold the data as it is being concatenated.
D -
Use the String class and the & operator.
6-
Your page myth.html contains a section header "King Arthur", which you
named using the following code: <a name="arthur"><h1></a>. How do you link to that
section in the page main.html in the same folder?
A -
<a href="myth.html@arthur">King Arthur</a>
B -
<a href="myth.html#King%20Arthur">King Arthur</a>
C -
<a href="myth.html:arthur">King Arthur</a>
D -
<a href="arthur@myth.html>"King Arthur</a>
7-
Your ASP.NET application cotains a Web form named login.aspx. When this
page is posted back to the server, you check he entered username and password against
your corporate database. If the username and password match, you want to display the
accountdetails.aspx Web form as the result in the users browser.
Excecution of the application will proceed from the accountdetails.aspx page.
How should you transfer control in this case?
A -
Use the HyperLink ASP.NET Web server control.
B -
Use the Response.Redirect() method.
C -
Use the Server.Transfer() method.
D -
Use the Server.Execute() method.
8-
Your Web application displays routing and timing information related to your
companys network. Each time a new page is loaded, it makes entirely new calculations
to determine which information to display. No page in the application passes any
information to another page in the application. Which alternative should you use for
session state in this application to maximize performance?
A -
In-process session state
B -
State Server session state
C -
<@% Page EnableSessionState="false"%>
D -
SQL Server session state
9-
Your Web form allows users to enter a telephone number into a TextBox
ASP.NET Web server control named txtPhone. You use the RegularExpressionValidator
control to ensure that the phone numbers are in the correct format.
The Web form also includes a Button ASP.NET Web server control, btnReset, to reset
the data entry values. You do not want the validatons to occur when button is clicked.
What should you do to ensure this?
A -
Set the CausesValidation peoperty of the Button control to false.
B -
Set the CausesValidation peoperty of the TextBox control to true.
C -
Set the CausesValidation peoperty of the TextBox control to false.
D -
Set the CausesValidation peoperty of the Button control to true.
10-
Your ASP.NET Web form displays ordering information for 50 products in
DataGrid and other controls. Your company is unable to accept Web orders, so there are
no controls on the page to post the data back to the server.
What can you do to optimize the delivery of this page?
A -
Set the EnableViewState attribure to false for the DataGrid control.
B -
Set the EnableViewState attribure to false for the Page directive.
C -
Set the EnableViewState attribure to true for the DataGrid control.
D -
Set the EnableViewState attribure to false for the Page directive.