Which two code segments should you use?
You are implementing an ASP.NET Web page.
You need to add a text box that allows only values between 1 and 10, inclusive, to be submitted.
Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.)
Which control markup should you use?
You are implementing an ASP.NET page that includes a text box.
You need to validate values that are typed by users to ensure that only numeric values are submitted.
Which control markup should you use?
What should you do?
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?
What should you do?
You are troubleshooting an ASP.NET Web application.
System administrators have recently expanded your web farm from one to two servers.
Users are periodically reporting an error message about invalid view state.
You need to fix the problem.
What should you do?
What should you do?
You have created an ASP.NET server control named ShoppingCart for use by other developers.
Some developers report that the ShoppingCart control does not function properly with ViewState disabled.
You want to ensure that all instances of the ShoppingCart control work even if ViewState is disabled.
What should you do?
Which two actions should you perform?
You are implementing an ASP.NET page that hosts a user control named CachedControl.
You need to ensure that the content of the user control is cached for 10 seconds and that it is regenerated when fetched after the 10 seconds elapse.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Which page event should add an event handler to?
You create an ASP.NET page named TestPage.aspx that contains validation controls.
You need to verify that all input values submitted by the user have been validated by testing the Page.IsValid property.
Which page event should add an event handler to?
Which code segment should you use?
You are implementing a read-only page that includes the following controls.
<asp:Button ID=”btnRefresh” runat=”server” Text=”Button” />
<asp:GridView ID=”gvCustomers” runat=”server” EnableViewState=”False” OnDataBinding=”gvCustomers_DataBinding”></asp:GridView>
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?
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 control markup should you use?
You are implementing an ASP.NET Web site that will be accessed by an international audience.
The site contains global and local resources for display elements that must be translated into the language that is selected by the user.
You need to ensure that the Label control named lblCompany displays text in the user’s selected language from the global resource file.
Which control markup should you use?