单项选择题X 纠错
A.protected void Page_PreInit(object sender, EventArgs e) { if (!IsPostBack) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); } }
B.protected void Page_Load(object sender, EventArgs e) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); }
C.protected void gvCustomers_DataBinding(object sender, EventArgs e) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); }
D.protected void Page_PreRender(object sender, EventArgs e) { if (!IsPostBack) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); } }
你可能喜欢
单项选择题
A.btnAddToCart_Click
B.Page_Load
C.Page_PreRender
D.Page_PreInit
单项选择题
A.<asp:Label ID="lblCompany" runat="server" meta:resourcekey="lblCompany" />
B.<asp:Label ID="lblCompany" runat="server" Text="meta:lblCompany.Text" />
C.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:lblCompanyText %>" />
D.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:WebResources, lblCompanyText %>" />
单项选择题
A.the EnableEventValidation attribute
B.the ResponseEncoding attribute
C.the ValidateRequest attribute
D.the Strict attribute
单项选择题
A.<%= Html.Action("ListEmployees", Model) %>
B.<%= Html.ActionLink("ListEmployees", "Department", "DepartmentController") %>
C.<% Html.RenderPartial("ListEmployees", Model); %>
D.<%= Html.DisplayForModel("ListEmployees") %>
单项选择题
A.Change the name of the Index.aspx file to Product.aspx.
B.Create a folder named Product inside the Views folder. Move Index.aspx to the Product folder.
C.Replace the @ Page directive in Index.aspx with the following value.
D.Modify the Index method by changing its signature to the following:public ActionResult Index(Product p)
单项选择题
A.Rename Score.ascx to LastScore.ascx.
B.Move Score.ascx from the Views/Shared/DisplayTemplates folder to theViews/Player/DisplayTemplates folder.
C.Add the following attribute to the LastScore property. [UIHint("Score")]
D.Add the following attribute to the LastScore property. [Display(Name="LastScore", ShortName="Score")]
多项选择题
A.Add the following attribute to the first Edit action. [AcceptVerbs(HttpVerbs.Head)]
B.Add the following attribute to the first Edit action. [HttpGet]
C.Add the following attribute to the second Edit action. [HttpPost]
D.Add the following attribute to the second Edit action. [HttpPut]
多项选择题
A.[Authorize(Users = "")]
B.[Authorize(Roles = "")]
C.[Authorize(Users = "*")]
D.[Authorize(Roles = "*")]
单项选择题
A.Add the ValidateAntiForgeryToken attribute to the Details action method.
B.Add the Bind attribute to the country parameter of the Details action method. Set the attribute’s Prefix property to Country.
C.Create a class that implements the IRouteConstraint interface. Configure the default route to use this class.
D.Create a class that implements the IRouteHandler interface. Configure the default route to use this class.
多项选择题
A.Add a DynamicDataManager control to the Web page.
B.Disable the auto-generated fields on GridView1. Add a DynamicField control for each field of the Product class.
C.Add the following code segment to the Application_Start method in the Global.asax.cs file.
D.Add the following code segment to the Page_Init method of the Web page.