试题详情
- 单项选择题你在创建一个 Web 窗体。这个 Web 窗体允许用户计算值并在名为 lblResults 的 Label 控件中显示结果。你需要在 Web 窗体通过 Error 事件截获所有未处理的异常并显示异常在 Web 窗体上。你可以使用下面那个代码段实现?()
A、protected void Page_Error(object sender, EventArgs e) { lblResults.Text = e.ToString();e=null;}
B、protected void Page_Error(object sender, EventArgs e) { lblResults.Text =Server.GetLastError().ToStri();Server.ClearError();}
C、protected void Page_Error(object sender, EventArgs e) Response.Write(e.ToString());e=null;}
D、protected void Page_Error(object sender, EventArgs e) Response.Write(Server.GetLastError().ToString()); Server.ClearError();}
- D
关注下方微信公众号,在线模考后查看
热门试题
- You are
- Your network&e
- You have a server t
- Your company&e
- 您在计算机上执行 Windo
- Your company has an
- Youhaveaprintservern
- your company has a s
- You have a DHCP serv
- 你是TestKing网站电脑管理员,你在
- You are
- 你要在100台机器上安装WindowsX
- You have
- You are t
- Your network&e
- Your network&e
- 你正在开发一个审计应用程序,要显示信任的
- You had
- You have
- 为应用程序开发人员上班 Certkill