多项选择题X 纠错
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.Bindable
B.DataObject
C.Serializable
D.DataContract
单项选择题
A.protected void SelectedLanguageChanged(object sender, EventArgs e) {Page.UICulture = ddlLanguage.SelectedValue;}
B.protected override void InitializeCulture() {Page.UICulture = Request.Form["ddlLanguage"];}
C.protected void Page_Load(object sender, EventArgs e) {Page.Culture = Request.Form["ddlLanguage"];}
D.protected override void InitializeCulture() {Page.Culture = ddlLanguage.SelectedValue;}
单项选择题
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.%@>%@>
单项选择题
A.Add the following method override. Protected Overrides Sub OnInit(ByVal e As EventArgs) MyBase.OnInit(e) If (Page.IsValid) Then Me.SaveToDatabase() End Sub
B.Add the following method override. Protected Overrides Sub OnLoad(ByVal e As EventArgs) MyBase.OnLoad(e) If (Page.IsValid) Then Me.SaveToDatabase() End Sub
C.Add the following method override.Protected Overrides Sub OnPreRender(ByVal e As EventArgs) MyBase.OnPreRender(e) If (Page.IsValid) Then Me.SaveToDatabase() End Sub
D.Add the following code segment at line 10. If (Page.IsValid) Then Me.SaveToDatabase()
单项选择题
A.Replace line 05 with the following code segment. routes.MapRoute( "Default", "{controller}/{action}/{id}", New With {.controller = "Home", .action = "DetailsByUsername", .id = ""})
B.Replace line 05 with the following code segment. routes.MapRoute("Default", "{controller}/{action}/{username}", New With {.controller = "Home", .action = "DetailsByUsername", .username = ""}, New With {.username = "\w{3,20}"} )
C.At line 04, add the following code segment.routes.MapRoute( "Details byUsername""{username}", New With {.controller = "Home", .action = "DetailsByUsername"}, New With {.username = "\w{3,20}"})
D.At line 04, add the following code segment. routes.MapRoute( "Details by Username", "{id}", New With {.controller = "Home", .action = "DetailsByUsername"}, New With {.id = "\w{3,20}"} )
单项选择题
A.Replace line 11 with the following code segment. context.MapRoute("product_default", "{area}/{controller}/{action}/{id}", New With {.area = "product", .controller = "Product", .action = "Index", .id = ""})
B.Replace line 11 with the following code segment. context.MapRoute("product_default", "{area}", New With {.controller = "Product", .action = "Index", .id = ""})
C.Add the following code segment at line 12. AreaRegistration.RegisterAllAreas()
D.Add the following code segment to the RegisterRoutes method in the Global.asax.vb file. AreaRegistration.RegisterAllAreas()
单项选择题
A.Public Sub New(ByVal app As HttpApplication) AddHandler app.EndRequest, AddressOf app_EndRequest End Sub Sub app_EndRequest(ByVal sender As Object, ByVal e As EventArgs) Dim app As HttpApplication = TryCast(sender, HttpApplication) app.Response.Write(footerContent) End Sub
B.Public Sub Init(ByVal app As HttpApplication) _ Implements IHttpModule.Init AddHandler app.EndRequest, AddressOf app_EndRequest End Sub Sub app_EndRequest(ByVal sender As Object, ByVal e As EventArgs) Dim app As HttpApplication = New HttpApplication() app.Response.Write(footerContent) End Sub
C.Public Sub New() Dim app As HttpApplication = New HttpApplication() AddHandler app.EndRequest, AddressOf app_EndRequest End Sub Sub app_EndRequest(ByVal sender As Object, ByVal e As EventArgs) Dim app As HttpApplication = TryCast(sender, HttpApplication) app.Response.Write(footerContent) End Sub
D.Public Sub Init(ByVal app As HttpApplication) _ Implements IHttpModule.Init AddHandler app.EndRequest, AddressOf app_EndRequest End Sub Sub app_EndRequest(ByVal sender As Object, ByVal e As EventArgs) Dim app As HttpApplication = TryCast(sender, HttpApplication)app.Response.Write(footerContent) End Sub
多项选择题
A.Configure the SqlMembershipProvider in the web.config file.
B.Configure the SqlProfileProvider in the web.config file.
C.Create an ASP.NET page that contains a default CreateUserWizard control to create a new user account.
D.Create an ASP.NET page that contains a custom form that collects the user information and then uses the Membership.CreateUser method to create a new user account.