单项选择题X 纠错

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")

参考答案:
查答案就用赞题库小程序 还有拍照搜题 语音搜题 快来试试吧
无需下载 立即使用

你可能喜欢

多项选择题

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";

单项选择题

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.

多项选择题

A.Add the following code segment to the project’s AssemblyInfo.cs file. [assembly: TagPrefix("DevControls", "Dev")]
B.Replace line 05 with the following code segment. [DefaultValue("New Task")]
C.Insert the following code segment immediately before line 03. [ToolboxData("<{0}:Task runat=\"server\" Title=\"New Task\" />")]
D.Replace line 10 with the following code segment. output.Write("<Dev:Task runat=\"server\" Title=\"New Task\" />");

多项选择题

A.Add the following line of code to TestUserControl.ascx.cs. public event MyEventHandler MyEvent;
B.Add the following line of code to TestUserControl.ascx.cs. public MyEventHandler MyEvent;
C.Replace the TestUserControl.ascx reference in TestPage.aspx with the following declaration. <uc:TestUserControl ID="testControl" runat="server" OnMyEvent="TestMethod"/>
D.Replace the TestUserControl.ascx reference in TestPage.aspx with the following declaration. <uc:TestUserControl ID="testControl" runat="server" MyEvent="TestMethod"/>

多项选择题

A.Add the following line of code to the TestUserControl.ascx.cs code-behind file. public string CityName { get { return "New York"; } } 
B.Add the following line of code to the TestUserControl.ascx.cs code-behind file. protected readonly string CityName = "New York"; 
C.Add the following code segment to the TestPage.aspx.cs code-behind file. protected void Page_Load(object sender, EventArgs e) { string s = testControl.CityName; } 
D.Add the following code segment to the TestPage.aspx.cs code-behind file. protected void Page_Load(object sender, EventArgs e) { string s = testControl.Attributes["CityName"]; } 

单项选择题

A.protected void Page_Load(object sender, EventArgs e) { Control userControl=Page.LoadControl("TestUserControl.ascx"); Page.Form.Controls.Add(userControl); }
B.protected void Page_Load(object sender, EventArgs e) { Control userControl = Page.FindControl("TestUserControl.ascx"); Page.Form.Controls.Load(userControl); }
C.protected void Page_PreInit(object sender, EventArgs e) { Control userControl =Page.LoadControl("TestUserControl.ascx");Page.Form.Controls.Add(userControl); }
D.protected void Page_PreInit(object sender, EventArgs e) { Control userControl = Page.FindControl("TestUserControl.ascx"); Page.Form.Controls.Load(userControl); }

单项选择题

A.Add the following code segment to the Page_Load method of the page code-behind file. CustomMaster custom = this.Parent as CustomMaster; lblRegion.Text = custom.Region;
B.Add the following code segment to the Page_Load method of the page code-behind file. CustomMaster custom = this.Master as CustomMaster; lblRegion.Text = custom.Region;
C.Add the following code segment to the Page_Load method of the Custom.Master.cs code-behind file. Label lblRegion = Page.FindControl("lblRegion") as Label; lblRegion.Text = this.Region;
D.Add the following code segment to the Page_Load method of the Custom.Master.cs code-behind file. Label lblRegion = Master.FindControl("lblRegion") as Label; lblRegion.Text = this.Region;

单项选择题

A.Add the following directive to TestPage.aspx. <%@ MasterType VirtualPath="~/TestMaster.master" %><%@ mastertype="" virtualpath="~/TestMaster.master">
B.Add the following directive to TestPage.aspx. <%@ PreviousPageType VirtualPath="~/TestMaster.master" %><%@ previouspagetype="" virtualpath="~/TestMaster.master">
C.Set the Strict attribute in the @ Master directive of the TestMaster.master page to true.
D.Set the Explicit attribute in the @ Master directive of the TestMaster.master page to true.

赞题库

赞题库-搜题找答案

(已有500万+用户使用)


  • 历年真题

  • 章节练习

  • 每日一练

  • 高频考题

  • 错题收藏

  • 在线模考

  • 提分密卷

  • 模拟试题

无需下载 立即使用

版权所有©考试资料网(ppkao.com)All Rights Reserved