submitOrderButton的主事件处理程序命名为submitOrderButton_Click,并在服务器上运行。一个名为verifyBeforeSubmit()的客户端函数显示了要求用户校验提交订单意愿的对话框。
- ~+ _+ D7 E4 `您需要确保verifyBeforSubmit()在submitOrderButton_Click之前运行。您应该怎么办?(C)
# D- D5 C7 A" i3 [* v: VA. 将HTML元素修改如下: % i( d) U4 t A! Q; F; ?
/ L' I. E3 S; E( U/ G; [B. 将HTML元素修改如下:
/ B. i3 a8 K3 m8 s # @: Q% c% |# m- W. H# f6 O
C. 将下列代码添加到OrderVerify.aspx的Page.Load事件管理程序: " U' C3 v" Y% @/ d' l! }. A
subitOrderButton.Attributes.Add(“onclick”,”verifyBeforeSubmit();”) ) N8 d% ?$ L, ]8 Z
D. 将下列代码添加到OrderVerify.aspx的Page.Load事件管理程序: ) X3 R+ O. u: {
subitOrderButton.Attributes.Add(“ServerClick”,”verifyBeforeSubmit();”) ; W. W! W1 Q+ o4 A
</p>50:您正在为一家销售录像带的在线商店创建一个ASP.NET应用程序。根据用户以往的购买情况,每个用户都将被指派一个配置文件。 ; r& n4 a4 a o5 _5 e5 v1 N
您编写了名为Displayrecommendations的过程,用于调用LoadUserProfile函数并在用户登录时显示推荐影片列表。如果无法找到该用户的配置文件,则LoadUserProfile函数会产生一个FileNotFoundException异常。 $ Q. v. M' w' F5 d
当FileNotFoundException异常产生时,您希望产生另一个描述性错误。此错误消息的文本存储在名为descriptionString的变量中。为了调试目的,您还希望可用编程方式访问FileNotFoundException错误。 0 f2 I0 }- K# U) l. p) `: t& a
您需要为此异常编写catch块。您应该使用哪段代码?(D) 2 k0 F; r9 U9 V7 q6 ?" M! e/ B
A. Cache ex As ApplicationException Z- l N! c: P8 t% x$ Y& ]
Throw New ApplicationExcetipn(descriptionstring ,ex)
, |$ L& z- p- C' _2 sB. Cache ex As FileNotFoundException
0 k' f _- X4 S v) MThrow New ApplicationExcetipn(descriptionstring ,ex)
: W2 e3 t% d% q5 S1 B3 ^C. Cache ex As ApplicationException & |1 c8 w- a2 B" ]) a+ o! W
Throw New ApplicationExcetipn(descriptionstring ,_ex.InnerException)
U1 l7 b( m, c' [$ PD. Cache ex As FileNotFoundException
! [! A0 e& k4 p* C Throw New ApplicationExcetipn(descriptionstring ,_ex.InnerException) |