单项选择题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?()

A.Configure the input control to run on the server. On the submit button, add a server-side OnClick handler that calls CheckCreditCard  and  rejects  the form submission if the input is invalid.
B.On the input control,add an onChange handler that calls CheckCreditCard and cancels the form submission when the  input  is invalid.
C.Configure the input control and the submit button to run on the server. Add a submit_OnClick handler that calls CheckCreditCard  and  rejects  the  form  submission  if  the input is invalid.
D.On the form, add an onSubmit handler that calls CheckCreditCard and cancels the form submission if the input  is invalid.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题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?()

A.Require developers to set EnableViewStateMac to true.
B.Store state in ControlState instead of ViewState.
C.Serialize the state into an Application state entry called "MyControl"
D.Require developers to change the session state mode to SQL Server.

2.多项选择题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?()

A.Modify the hosting page’s caching directive as follows.
B.Add the following meta tag to the Head section of the hosting page.
C.Add the following caching directive to the hosted control.
D.Add the following caching directive to the hosted control.

4.单项选择题

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?() 

A.protected void Page_PreInit(object sender, EventArgs e) { if (!IsPostBack) { gvCustomers.DataSource = GetCustomers();  gvCustomers.DataBind(); } }
B.protected void Page_Load(object sender, EventArgs e) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); }
C.protected void gvCustomers_DataBinding(object sender, EventArgs e) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); }
D.protected void Page_PreRender(object sender, EventArgs e) { if (!IsPostBack) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); } }

6.单项选择题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?()

A.<asp:Label ID="lblCompany" runat="server" meta:resourcekey="lblCompany" />
B.<asp:Label ID="lblCompany" runat="server" Text="meta:lblCompany.Text" /> 
C.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:lblCompanyText %>" />
D.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:WebResources, lblCompanyText %>" />

9.单项选择题

You create an ASP.NET MVC 2 Web application that contains the following controller class.
In the Views folder of your application, you add a view page named Index.aspx that includes the following @ Page directive.

You test the application with a browser.You receive the following error message when the Index method is invoked: "The view 'Index' or its master was not found." You need to resolve the error so that the new view is displayed when the Index method is invoked.What should you do?()

A.Change the name of the Index.aspx file to Product.aspx.
B.Create a folder named Product inside the Views folder. Move Index.aspx to the Product folder.
C.Replace the @ Page directive in Index.aspx with the following value.
D.Modify the Index method by changing its signature to the following:public ActionResult Index(Product p)

最新试题

You are developing a Asp.net web application tht includes a panel control that has ID contentsection.You need to add a textBox control to the panel control.()

题型:单项选择题

Which class defines the contract that ASP.NET implements to provide membership services using custom membership providers?()

题型:单项选择题

Which of the following is the correct collection of build events?()

题型:单项选择题

You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform.  You create an ASP.NET Web application using .NET Framework 4.0. The ASP.NET application is used to track employee performance. It uses Microsoft Windows authentication. Employees are members of a group named Employees.  Managers are members of a group named Managers.  The root folder of the application is named Details. The Details folder displays information about employees„ performance.  The Details folder has a subfolder named MoreDetails. You need to ensure that employees and managers can access pages stored in the Details folder. However, only managers can access pages stored in the MoreDetails folder.   You make the following entries in the Web.config file in the Details folder.You make the following entries in the Web.config file in the MoreDetails folder.When managers try to access pages stored in the MoreDetails folder, they receive the following error message:"An error occurred during the processing of a configuration file required to service this request." You must ensure that managers are able to access pages stored in the MoreDetails folder. What will you do to accomplish this?()

题型:单项选择题

You are developing a WCF service. The service includes an operation names GetProduct. You need to ensure that GetProduct will accept a POST request and will indicate that the returned data is XML.  Which two actions should you perform?()

题型:多项选择题

You are perfoming security testing on an existing asp.net web page.You notice that you are able to issue unauthorised postback requests to the page. You need to prevent unauthorised post back requests. which page directive you use?()

题型:单项选择题

You are developing an ASP.NET Web page that uses jQuery validation. The user should enter a valid email address in a text box that has ID txtEmail. The page must display "E-Mail address required" when the user does not enter an address and "Invalid e-mailaddress" when the user enters an address that is not formatted properly. You need to ensure that the appropriate error message is displayed when the text box does not contain a valid e-mail address.  Which two code segments should you add?()

题型:多项选择题

Which tool is used to simplify the migration, management and deployment of IIS Web servers, Web applications and Web sites?()

题型:单项选择题

You are developing an ASP.NET MVC 2 Web Application. You need to implement an asynchronous controller named AccountingController, and you must ensure that the export action required proper authorization.Which code segment should you use?()

题型:单项选择题

You develop an ASP.NET Web page that includes multiple WebPartZone controls, an EditorZone. Users report that they cannot customize the layout of the page by moving WebParts from one.You need to ensure that users can successfully move Web Parts from one zone to another. What should you do?()

题型:单项选择题