which attribute should you set to true?
You are testing an existing ASP.NET page. The page includes a text You are able to execute malicious
JavaScript code by typing it in the text box and submitting. You need to configure the page to
prevent JavaScript code from being submitted by the text box. In the @ Page directive, which
attribute should you set to true?
You need to create and use a separate style for the Help button, and you must use the default style for the De
You are implementing an ASP.NET page. You add asp:Button controls for Help and for Detail. You
add an ASP.NET skin file named default.skin to a theme. You need to create and use a separate style
for the Help button, and you must use the default style for the Detail button. What should you do?
Which event handler should you add?
You are implementing an ASP.NET page in an e-commerce application. Code in a btnAddToCart_Click
event handler adds a product to the shopping cart. The page should check the status of the shopping
cart and always show a cart icon when one or more items are in the shopping cart. The page should
hide the icon when the shopping cart has no items. You need to add an event handler to implement
this requirement. Which event handler should you add?
Which code segment should you use?
You are implementing a read-only page that includes the following controls. You disable view state
to improve performance. You need to ensure that the page is updated to display the latest data
when the user clicks the refresh button. Which code segment should you use?
You need to ensure that the form cannot be used to submit invalid credit card numbers to the server
You are developing a Web page. The user types a credit card number into an input control named cc
and clicks a button named submit. The submit button sends the credit card number to the server. A
JavaScript library includes a CheckCreditCard function that returns a value of true if the credit card
appears to be valid, based on its checksum. You need to ensure that the form cannot be used to
submit invalid credit card numbers to the server. What should you do?
You need to create the form so that when the user clicks the label, the corresponding text box is selected for
You are dynamically adding controls to an ASP.NET page in the Page_Load event handler. The page
will have text boxes that correspond to the columns in a database table. Each text box will be
preceded by a label that displays the name of the corresponding column. You need to create the
form so that when the user clicks the label, the corresponding text box is selected for input. What
should you do?
Which two actions should you perform?
You create a custom server control named Task that contains the following code segment. (Line
numbers are included for reference only.)
You need to ensure that adding a Task control from the Toolbox creates markup in the following
format.
<Dev:Task ID=”Task1″ runat=”server” Title=”New Task” />
Which two actions should you perform? (Each correct answer presents part of the solution. Choose
two.)
Which two actions should you perform?
You are implementing an ASP.NET application that makes extensive use of JavaScript libraries. Not
all pages use all scripts, and some scripts depend on other scripts. When these libraries load
sequentially, some of your pages load too slowly. You need to use the ASP.NET Ajax Library Script
Loader to load these scripts in parallel. Which two actions should you perform? (Each correct answer
presents part of the solution. Choose two.)
Which code segment should you use?
A Web page includes the HTML shown in the following code segment.
<span id=”ref”>
<a name=Reference>Check out</a>
the FAQ on
<a href=”http://www.contoso.com”>
Contoso</a>’s web site for more information:
<a href=”http://www.contoso.com/faq”> FAQ </a>.
</span>
<a href=”http://www.contoso.com/ home “> Home </a>
You need to write a JavaScript function that will dynamically format in boldface all of the hyperlinks
in the ref span. Which code segment should you use?
You need to implement this client-side event
You are building an ASP.NET control. The control displays data by using a table element with a class
attribute value of Results. The control should expose a client-side event named onrowselected that
fires when a check box in a table row is selected. You need to implement this client-side event. What
should you do?