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()
You are creating an ASP.NET Web site. You create a HTTP module named Custom Module, and you register the module in the web.config file.The Custom Module class contains the following code. Public Class Custom Module Implements IHttpModule
Dim footerContent As String = Footer Content"Public Sub Dispose() Implements IHttpModule.DisposeEnd SubEnd Class You need to add code to CustomModule to append the footer content to each processed ASP.NET page. Which code segment should you use?()
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.
A.Add the following method to the CompanyController class. Function Info() As ActionResult Return View() End Function
B.Add the following method to the CompanyController class. Function Company_Info() As ActionResult Return View() End Function
C.Right-click the Views folder, and select View from the Add submenu to create the view for the action.
D.Right-click inside the action method in the CompanyController class, and select Add View to create a view for the action
A.Html.ActionLink("Home", "Index", "Home")
B.Html.ActionLink("Home", "Index", "Home", New With {.area = ""}, Nothing)
C.Html.ActionLink("Home", "Index", "Home", New With {.area = "Blog"}, Nothing)
D.Html.ActionLink("Home", "Index", "Home", New With {.area = "Home"}, Nothing)
A.AjaxHelper
B.XDocument
C.JsonResult
D.DataContractJsonSerializer
A.<%= Html.Action("ListEmployees", Model) %>
B.<%= Html.ActionLink("ListEmployees", "Department", "DepartmentController") %>
C.<% Html.RenderPartial("ListEmployees", Model) %>
D.<%= Html.DisplayForModel("ListEmployees") %>
A.Rename Score.ascx to LastScore.ascx.
B.Move Score.ascx from the Views/Shared/DisplayTemplates folder to the Views/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 directive to TestPage.aspx. <%@ MasterType VirtualPath="~/TestMaster.master" %>
B.Add the following directive to TestPage.aspx. <%@ 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.
最新试题
You are developing an ASP.NET Web application.The application is configured to use the membership and role providers. You need to allow all users to perform an HTTP GET for application resources, but you must allow only the user named Moderator to perform a POST operation.Which configuration should you add to the web.config file?()
You are debugging an ASP.NET Web application by using the Visual Studio debugger. The application is incorrectly handling a SQL Exception on the login page. You need to break execution where the exception is thrown . What should you do?()
Which class defines the contract that ASP.NET implements to provide membership services using custom membership providers?()
Which of the following is the correct collection of build events?()
You need to ensure that when the button is clicked, both update panels update the tim without generating a postback. What should you do?()
You have migrated a web application from .net 3.5 to 4.0. the application hat to render same as in .net 3.5.()
You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform. You have recently finished the development of an ASP.NET Web application using .NET Framework 4.0. Now, you are deploying the ASP.NET Web application to a remote server. You are required to select a deployment method that will make sure that all Internet Information Services (IIS) settings, in addition to the Web content, are deployed to the remote server. Which of the following deployment methods will you select to accomplish this?()
You are developing an ASP.NET MVC 2 Web Application. You need to implement an asynchronous controller named AccountingController, and you must ensure that the export action required proper authorization.Which code segment should you use?()
Which method of the Page class searches the page naming container for a server control with a particular identifer?()
A library called contosobuisness.dll has been created and u need to accept it in a page.. all options had the <%assembly tag but the att differed.()