单项选择题
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.
相关考题
-
单项选择题
YouhavecreatedanASP.NETservercontrolnamedShoppingCartforusebyotherdevelopers.SomedevelopersreportthattheShoppingCartcontroldoesnotfunctionproperlywithViewStatedisabled.YouwanttoensurethatallinstancesoftheShoppingCartcontrolworkevenifViewStateisdisabled.Whatshouldyoudo?()
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. -
多项选择题
YouareimplementinganASP.NETpagethathostsausercontrolnamedCachedControl.Youneedtoensurethatthecontentoftheusercontroliscachedfor10secondsandthatitisregeneratedwhenfetchedafterthe10secondselapse.Whichtwoactionsshouldyouperform?()
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. -
单项选择题
YoucreateanASP.NETpagenamedTestPage.aspxthatcontainsvalidationcontrols.YouneedtoverifythatallinputvaluessubmittedbytheuserhavebeenvalidatedbytestingthePage.IsValidproperty.Whichpageeventshouldaddaneventhandlerto?()
A.Ini
B.Load
C.PreInit
D.PreLoad
