移动端

  • 题王微信公众号

    题王微信公众号

    微信搜“题王网”真题密题、最新资讯、考试攻略、轻松拿下考试

单选题

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?()

发布日期:2020-04-10

You create a new ASP.NET MVC 2 Web application. Th...
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}"} )

题王网让考试变得更简单

扫码关注题王,更多免费功能准备上线!

此试题出现在

CMS专题

CMS专题

去刷题
热门试题热门资讯 相关试题

暂无相关推荐~