单选题You create a new ASP.NET MVC 2 Web application. The following default routes are created in the Global.asax.vb file.01 Shared Sub RegisterRoutes(ByVal routes As RouteCollection)02  03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}")04  05 routes.MapRoute( "Default", "{controller}/{action}/{id}", New With {.controller = "Home", .action = "Index", .id = ""})  06 End Sub  You implement a controller named HomeController that includes methods with the following signatures.Function Index() As ActionResult  Function Details(ByVal id As Integer) As ActionResultFunction DetailsByUsername(   ByVal username As String) As ActionResult  You need to add a route to meet the following requirements.   The details for a user must be displayed when a user name is entered as the path by invoking the DetailsByUsername action.  User names can contain alphanumeric characters and underscores, and can be between 3 and 20 characters long.What should you do?()AReplace line 05 with the following code segment. routes.MapRoute( "Default", "{controller}/{action}/{id}", New With {.controller = "Home", .action = "DetailsByUsername", .id = ""})BReplace 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}"} )CAt line 04, add the following code segment.routes.MapRoute( "Details byUsername""{username}", New With {.controller = "Home", .action = "DetailsByUsername"}, New With {.username = "/w{3,20}"})DAt 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}"} )

单选题
You create a new ASP.NET MVC 2 Web application. The following default routes are created in the Global.asax.vb file.01 Shared Sub RegisterRoutes(ByVal routes As RouteCollection)02  03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}")04  05 routes.MapRoute( "Default", "{controller}/{action}/{id}", New With {.controller = "Home", .action = "Index", .id = ""})  06 End Sub  You implement a controller named HomeController that includes methods with the following signatures.Function Index() As ActionResult  Function Details(ByVal id As Integer) As ActionResultFunction DetailsByUsername(   ByVal username As String) As ActionResult  You need to add a route to meet the following requirements.   The details for a user must be displayed when a user name is entered as the path by invoking the DetailsByUsername action.  User names can contain alphanumeric characters and underscores, and can be between 3 and 20 characters long.What should you do?()
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}"} )


参考解析

解析: 暂无解析

相关考题:

You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 3.5.  When you review the application performance counters, you discover that there is an unexpected increase in the value of the Application Restarts counter. You need to identify the reasons for this increase.  What are three possible reasons that could cause this increase?()A、Restart of the Microsoft IIS 6.0 host. B、Restart of the Microsoft Windows Server 2003 that hosts the Web application. C、Addition of a new assembly in the Bin directory of the application. D、Addition of a code segment that requires recompilation to the ASP.NET Web application. E、Enabling of HTTP compression in the Microsoft IIS 6.0 manager for the application. F、Modification to the Web.config file in the system.web section for debugging the application.

Certkiller.com has hired you as a system administrator for their network. The previousadministrator created a Microsoft ASP.NET Web application. Microsoft .NET Framework v3.5 wasused to create this application. You detect an unexpected increase in the value of the Application Restarts counter whilstmonitoring the application performance counters. You receive an instruction from management toidentify the reasons for the increase. What should you identify?()A、The increase occurred due to changes made to the Web.config file in the system.web sectionfor debugging the application.B、The increase occurred due to the Microsoft IIS 6.0 host being restarted.C、The increase occurred due to an additional code fragment that needs recompilation to theASP.NET Web application.D、The increase occurred due to the Microsoft Windows Server 2003 that hosts the Webapplication being restarted.E、The increase occurred due to an additional new assembly in the Bin directory of the application.F、The increase occurred due to HTTP compression being enabled in the Microsoft IIS 6.0manager for the application

You have a Windows Server 2008 server that has the Web Server (IIS) server role installed. The server hosts multiple Web sites.  You need to configure the server to automatically release memory for a single Web site. You must achievethis goal without affecting the other Web sites. What should you do?()A、Create a new Web site and edit the bindings for the Web site.B、Create a new application pool and associate the Web site to the application pool.C、Create a new virtual directory and modify the Physical Path Credentials on the virtual directory.D、From the Application Pool Defaults, modify the Recycling options.

You have a server named Server1 that runs Windows Server 2003 Web Edition Service Pack 2 (SP2). You create a new virtual directory named App1. App1 contains a Web application. Users report that when they enter http://app1 in their Web browsers, they are unable to connect to the Web application. You need to ensure that users can access the Web application when they connect to http://app1. What should you do? ()A、Move the content of the Web application to C:/App1. Change the home directory for App1.B、Move the content of the Web application to C:/App1. Change the application pool for App1.C、Remove the App1 virtual directory. Create a new Web site, and then configure the Web site to use port 8080. In DNS, create a Host record for App1.D、Remove the App1 virtual directory. Create a new Web site, and then configure the Web site to use a host header of App1. In DNS, create a Host record for App1.

You are developing an ASP.NET Web application. You create a master page. The master page requires a region where you can add page-specific content by using the ASP.NET page designer.  You need to add a control to the master page to define the region. Which control should you add?()A、ContentB、ContentPlaceHolderC、PlaceHolderD、Substitution

You need to design a domain model that meets the company business and security requirements for controlling access to the new Web-based ordering application. What should you do?()A、Create a child OU within the existing domainB、Create a child domain of the existing domainC、Create a new domain in a new forest. Configure the new domain to trust the existing domainD、Create a new tree in the existing forest. Configure the new domain to trust the existing domain

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  When you access the application in a Web browser, you receive the following error message: "Service Unavailable".  You need to access the application successfully.  What should you do? ()A、Start Microsoft IIS 6.0.B、Start the Application pool.C、Set the .NET Framework version.D、Add the Web.config file for the application.

You are developing an ASP.NET Web application. You create a master page. The master page requires a region where you can add page-specific content by using theASP.NET page designer. You need to add a control to the master page to define the region. Which control should you add?()A、PlaceHolderB、ContentPlaceHolderC、ContentD、Substituition

You work as an ASP.NET Web Application Developer for SomeCompany.  The company uses Visual Studio .NET 2010 as its application development platform. You create an ASP.NET Web application using .NET Framework 4.0. You create a Web page in the application. The Web page will get large sets of data from a data source.  You add a DataPager control to the page. You are required to display navigation controls that enable you to create a custom paging Ul for the DataPager control. What will you do?()A、Use NextPreviousPagerField.B、Use NumericPagerField.C、Use PreviousPagerField.D、Use NextPagerField.E、Use TemplatePagerField.

You are implementing an ASP.NET MVC 2 Web application. The URL with path /Home/Details/{country} will return a page that provides information about the named country. You need to ensure that requests for this URL that contain an unrecognized country value will not be processed by the Details action of HomeController. What should you do?()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.

You create a Visual Studio 2010 solution that includes a WCF service project and an ASP.NET project. The service includes a method named GetPeople that takes no arguments and returns an array of Person objects. The ASP.NET application uses a proxy class to access the service. You use the Add Service Reference wizard to generate the class. After you create the proxy, you move the service endpoint to a different port. You need to configure the client to use the new service address. In addition, you must change the implementation so that calls to the client proxy will return a List instead of an array. Which two actions should you perform?()A、In the context menu for the service reference in the ASP.NET project, select the Configure Service Reference commSystem.Collections.Generic.ListB、In the context menu for the service reference in the ASP.NET project, select the Update Service Reference commaC、Change the service interface and implementation to return a ListD、Edit the address property of the endpoint element in the web.config file to use the new service address

You are implementing an ASP.NET Web application. Users will authenticate to the application with an ID. The application will allow new users to register for an account. The application will generate an ID for the user based on the users full name. You need to implement this registration functionality. Which two actions should you perform?()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.

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You plan to deploy the application to a test server.  You need to ensure that during the initial request to the application, the code-behind files for the Web pages are compiled. You also need to optimize the performance of the application.  Which code fragment should you add to the Web.config file?()Acompilation debug=true Bcompilation debug=false Ccompilation debug=true batch=true Dcompilation debug=false batch=false

多选题You are implementing an ASP.NET Web application. Users will authenticate to the application with an ID. The application will allow new users to register for an account. The application will generate an ID for the user based on the users full name. You need to implement this registration functionality. Which two actions should you perform?()AConfigure the SqlMembershipProvider in the web.config file.BConfigure the SqlProfileProvider in the web.config file.CCreate an ASP.NET page that contains a default CreateUserWizard control to create a new user account.DCreate 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.

单选题You are developing an ASP.NET MVC 2 Web application. The application contains a controller named HomeController, which has an action named Index. The application also contains a separate area named Blog. A view within the Blog area must contain an ActionLink that will link to the Index action of the HomeController. You need to ensure that the ActionLink in the Blog area links to the Index action of the HomeController. Which ActionLink should you use?()AHtml.ActionLink(Home, Index, Home)BHtml.ActionLink(Home, Index, Home, new {area = }, null)CHtml.ActionLink(Home, Index, Home, new {area = Blog}, null)DHtml.ActionLink(Home, Index, Home, new {area = Home}, null)

单选题You are developing an ASP.NET MVC 2 Web application. The application contains a controller named Home Controller, which has an action named Index. The application also contains a separate area named Blog. A view within the Blog area must contain an Action Link that will link to the Index action of the Home Controller. You need to ensure that the Action Link in the Blog area links to the Index action of the HomeController. Which Action Link should you use?()AHtml.ActionLink(Home, Index, Home)BHtml.ActionLink(Home, Index, Home,  New With {.area = }, Nothing)CHtml.ActionLink(Home, Index, Home,  New With {.area = Blog}, Nothing)DHtml.ActionLink(Home, Index, Home,  New With {.area = Home}, Nothing)

单选题ou are developing an ASP.NET MVC 2 application. You create a view that will be returned by action methods in multiple controllers. You need to place the view in the appropriate folder. To which subfolder within the Views folder should you add the view?()AMasterBDefaultCSharedDCommon

单选题You manage a server that runs Windows Server 2008. The server has the Web Server (IIS) role installed. The Web developer at your company creates a new Web site that runs an ASP.NET 3.0 Web application.  The ASP.NET Web application must run under a security context that is separate from any other ASP.NET application on the Web server.  You create a local user account and grant account rights and permissions to run the ASP.NET Web application.  You need to configure authentication for the new Web site to support the Web application. What should you do?()AConfigure the Windows Authentication setting to Enabled.BConfigure the Forms Authentication setting to Enabled by using all the default settings.CConfigure the ASP.NET State service to log on to the new local user account by using the Services console.DConfigure the ASP.NET Impersonation setting to Enabled. Edit the ASP.NET Impersonation setting by specifying the new local user account.

单选题You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 3.5.  You use Windows Authentication for the application. You set up NTFS file system permissions for the Sales group to access a particular file. You discover that all the users are able to access the file.  You need to ensure that only the Sales group users can access the file. What additional step should you perform?()ARemove the rights from the ASP.NET user to the file. BRemove the rights from the application pool identity to the file. CAdd the identity impersonate=true/ section to the Web.config file. DAdd the authentication mode=[None] section to the Web.config file.

单选题You are employed as the senior administrator at Certkiller.com. You make use of Microsoft .NETFramework v3.5 to create a Microsoft ASP.NET application.  You make use of ASP.NET AJAX create a Web form. The code fragment below exists in the Webfrom. (The line numbers is included for reference purposes) 01  10 11  13   You make use of the initComponents function to create and start a user behavior. This userbehavior is named CKBehavior. You have to make sure that CKBehavior is attached to CKTextBoxA. You should determine the appropriate code segment you need to add in line 6 toaccomplish this.  What should you identify?()AYour best option would be to insert Sys.Component.create(CKBehavior, $get('CKTextBoxA'),null, null, null)BYour best option would be to insert Sys.Component.create(CKBehavior, 'CKTextBoxA', null,null, null)CYour best option would be to insert $create(CKBehavior, null, null, null, $get('CKTextBoxA'))DYour best option would be to insert $create(CKBehavior, null, null, null, 'CKTextBoxA')

单选题You modify an existing Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You add a theme to the ASP.NET application.  You need to apply the theme to override any settings of individual controls.  What should you do?()AIn the Web.config file of the application,set the Theme attribute of the pages element to the name of the theme.BIn the Web.config file of the application,set the StyleSheetThemeattribute of the pages element to the name of the theme.CAdd a master page to the application. In the @Master directive,set the Theme attribute to the name of the theme.DAdd a master page to the application. In the @Master directive,set the StyleSheetTheme attribute to the name of the theme.

单选题You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform. You create an ASP.NET MVC 2 Web application using .NET Framework 4.0. You implement a single project area in the MVC 2 Web application. In the Areas folder, you add a subfolder named MyTest. You add the following files to the appropriate sub-folders:  MyController. csMyHome.aspx  You register a route of the area, setting the route name to MyTest_default and the area name to test. You create a view named MyViews.aspx that is outside the test area. You need to add a link to MyViews.aspx that points to MyHome.aspx. Which of the following code segments will you use?()A%= Html.ActionLink(MyTest, MyHome, new {area = test}, null)%B%= Html.RouteLink(MyHome, MyTest, new {area = test}, null)% C%= Html.RouteLink(MyTest, MyHome, MyTest, new {area = test}, null)%D%= Html.ActionLink(MyTest, MyHome, MyTest, new {area = test}, null)%

单选题You work as the IT professional in an international company which is named Wiikigo. You are experiencedin implementing and administering a network operating system. You are specialized in deploying servers,configuring Windows Server 2008 Terminal services and network application services, and configuring aweb services infrastructure. You are in charge of a server that runs Windows Server 2008. The server hasthe Web Server (IIS) server role installed. The Web developer at your company creates a new Web sitethat runs an ASP.NET 3.0 Web application. The ASP.NET Web application must run under a securitycontext that is separate from any other ASP.NET application on the Web server. You create a local useraccount and grant account rights and permissions to run the ASP.NET Web application. Authentication forthe new Web site should be configured to support the Web application. What action should you perform?()AThe ASP.NET Impersonation setting should be configured to Enabled. Edit the ASP.NET Impersonation setting by specifying the new local user account.BThe Windows Authentication setting should be configured to Enabled.CThe Forms Authentication setting should be configured to Enabled by using all the default settings.DThe ASP.NET State Service should be configured to log on to the new local user account by using the Services console.

单选题You are developing an ASP.NET MVC 2 Web application. A page makes an AJAX request and expects a list of company names in the following format. ["Adventure Works","Contoso"] You need to write an action method that returns the response in the correct format. Which type should you return from the action method?()AAjaxHelperBXDocumentCJsonResultDDataContractJsonSerializer

多选题You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 3.5.  When you review the application performance counters, you discover that there is an unexpected increase in the value of the Application Restarts counter. You need to identify the reasons for this increase.  What are three possible reasons that could cause this increase?()ARestart of the Microsoft IIS 6.0 host.BRestart of the Microsoft Windows Server 2003 that hosts the Web application.CAddition of a new assembly in the Bin directory of the application.DAddition of a code segment that requires recompilation to the ASP.NET Web application.EEnabling of HTTP compression in the Microsoft IIS 6.0 manager for the application.FModification to the Web.config file in the system.web section for debugging the application.