单项选择题
You are implementing an ASP.NET Web site. The root directory of the site contains a page named Error.aspx. You need to display the Error.aspx page if an unhandled error occurs on any page within the site. You also must ensure that the original URL in the browser is not changed. What should you do?()
A.Add the following configuration to the web.config file.
B.Add the following configuration to the web.config file.
C.Add the following code segment to the Global.asax file.
D.Add the following code segment to the Global.asax file.
相关考题
-
单项选择题
YouarecreatinganASP.NETWebsite.ThesiteisconfiguredtouseMembershipandRolemanagementproviders.Youneedtocheckwhetherthecurrentlylogged-onuserisamemberofarolenamedAdministrators.Whichcodesegmentshouldyouuse?()
A.bool isMember = Roles.GetUsersInRole("Administrators").Any()
B.bool isMember = Membership.ValidateUser(User.Identity.Name, "Administrators")
C.bool isMember = Roles.GetRolesForUser("Administrators").Any()
D.bool isMember = User.IsInRole("Administrators") -
多项选择题
YoucreateanASP.NETpagethatcontainsthefollowingtag.PageNameYouneedtowritecodethatwillchangethecontentsofthetagdynamicallywhenthepageisloaded.Whataretwopossiblewaystoachievethisgoal?()
A.this.hdr1.InnerHtml = "Text";
B.(hdr1.Parent as HtmlGenericControl).InnerText = "Text";
C.HtmlGenericControl h1 = this.FindControl("hdr1") as HtmlGenericControl;h1.InnerText = "Text";
D.HtmlGenericControl h1 = Parent.FindControl("hdr1") as HtmlGenericControl;h1.InnerText = "Text"; -
单项选择题
You are implementing an ASP.NET page that includes the following drop-down list. You need to dynamically add values to the end of the drop-down list. What should you do? ()
A.Add the following OnPreRender event handler to the asp:DropDownList
B.Add the following OnPreRender event handler to the asp:DropDownList
C.Add the following event handler to the page code-behind.
D.Add the following event handler to the page code-behind.
