niusouti.com

单选题在ASP.NETMVC中,URL模式为“admin/{controller}/{action}/{id}”,使用下述代码产生的URL为()。A /Book/Edit/111?cid=2Url.Action(Edit,Book,new{id=111,cid=2})B /Edit/Book/111/2Url.Action(Edit,Book,new{id=111,cid=2})C /admin/Edit/Book/111/2Url.Action(Edit,Book,new{id=111,cid=2})D

题目
单选题
在ASP.NETMVC中,URL模式为“admin/{controller}/{action}/{id}”,使用下述代码产生的URL为()。
A

/Book/Edit/111?cid=2Url.Action(Edit,Book,new{id=111,cid=2})

B

/Edit/Book/111/2Url.Action(Edit,Book,new{id=111,cid=2})

C

/admin/Edit/Book/111/2Url.Action(Edit,Book,new{id=111,cid=2})

D

/admin/Book/Edit/111?cid=2Url.Action(Edit,Book,new{id=111,cid=2})


相似考题
更多“在ASP.NETMVC中,URL模式为“admin/{controller}/{action}/{id}”,使用下述代码”相关问题
  • 第1题:

    HTTP状态代码中,出现那个代码URL不会在SERP中删除()

    • A、200
    • B、404
    • C、500
    • D、301

    正确答案:D

  • 第2题:

    VLAN协议规定:VLAN ID中的0和4095为协议保留使用,用户的VLAN ID是在1~4094之间取值


    正确答案:错误

  • 第3题:

    在Java中,下列关于重定向和转发的描述正确的是()。  

    • A、 转发对应的代码为:rquest.getRequestDispatcher(url).forward(request,response);
    • B、 重定向对应的代码为:request.sendRedirect(url);
    • C、 重定向在用户的浏览器端被处理。
    • D、 转发后,浏览器的地址栏内容会发生改变。

    正确答案:A,C

  • 第4题:

    在框架中,在整个框架页中打开链接的代码是()

    • A、<a href=URL target=_blank>..</a> 
    • B、<a href=URL target=_top>..</a> 
    • C、<a href=URL target=_main>..</a> 
    • D、<a href=URL target=_self>..</a>

    正确答案:B

  • 第5题:

    代码:.st1215 {font-family:"宋体";font-size:12px;line-height:1.5;}使用了“类”来设置文字样式,在页面中引用该样式的命令语句为()

    • A、class=st1215
    • B、class=.st1215
    • C、id=st1215
    • D、id=#st1215

    正确答案:A

  • 第6题:

    在Dreamweaver中,查看HTML的代码,下面哪种方法是正确的?()

    • A、在HTML纯文本编辑模式下可以查看HTML代码
    • B、在HTML纯文本编辑模式下不能查看HTML代码
    • C、在页面模式下可以查看HTML代码
    • D、在HTML纯文本+页面模式下不能查看HTML代码

    正确答案:A

  • 第7题:

    struts2自定义拦截器中的“return invocation.invoke”代码表示()。

    • A、不执行目标Action的方法,直接返回
    • B、执行目标Action的方法,直接返回逻辑视图名称
    • C、在自定义拦截器中,该代码是必需的
    • D、在自定义拦截器中,该代码是可选的

    正确答案:B,D

  • 第8题:

    Which configuration option can be set either in the initial console menu or the Admin UI of the Infranet Controller? ()

    • A、VLAN ID
    • B、Hostname
    • C、Domain name
    • D、Administrative timeout

    正确答案:C

  • 第9题:

    多选题
    struts2自定义拦截器中的“return.invocation.invoke”代码表示()
    A

    不执行目标Action的方法,直接返回

    B

    执行目标Action的方法,直接返回逻辑视图名称

    C

    在自定义拦截器中,该代码是必需的

    D

    在自定义拦截器中,该代码是可选的


    正确答案: A,D
    解析: 暂无解析

  • 第10题:

    单选题
    在ASP.NETMVC中,URL模式为“admin/{controller}/{action}/{id}”,使用下述代码产生的URL为()。
    A

    /Book/Edit/111?cid=2Url.Action(Edit,Book,new{id=111,cid=2})

    B

    /Edit/Book/111/2Url.Action(Edit,Book,new{id=111,cid=2})

    C

    /admin/Edit/Book/111/2Url.Action(Edit,Book,new{id=111,cid=2})

    D

    /admin/Book/Edit/111?cid=2Url.Action(Edit,Book,new{id=111,cid=2})


    正确答案: D
    解析: 暂无解析

  • 第11题:

    单选题
    EMPLOYEES and DEPARTMENTS data: EMPLOYEES DEMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_I 101 Smith 20 120 SA_REP 4000 102 Martin 10 105 CLERK 2500 103 Chris 20 120 IT_ADMIN 4200 104 John 30 108 HR_CLERK 2500 105 Diana 30 108 IT_ADMIN 5000 106 Smith 40 110 AD_ASST 3000 108 Jennifer 30 110 HR_DIR 6500 110 Bob 40 EX_DIR 8000 120 Ravi 20 110 SA_DIR 6500 DEPARTMENTS DEPARTMENT_ID DEPARTMENT_NAME 10 Admin 20 Education 30 IT 40 Human Resources On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID managers and refers to the EMPLOYEE_ID. On the DEPARTMENTS table DEPARTMENT_ID is the primary key. Evaluate this UPDATE statement. UPDATE employees SET mgr_id = (SELECT mgr_id FROM employees WHERE dept_id= (SELECT department_id FROM departments WHERE department_name = 'Administration')), Salary = (SELECT salary FROM employees WHERE emp_name = 'Smith') WHERE job_id = 'IT_ADMIN'; What happens when the statement is executed?()
    A

    The statement executes successfully, leaves the manager ID as the existing value, and changes the salary to 4000 for the employees with ID 103 and 105.

    B

    The statement executes successfully, changes the manager ID to NULL, and changes the salary to 4000 for the employees with ID 103 and 105.

    C

    The statement executes successfully, changes the manager ID to NULL, and changes the salary to 3000 for the employees with ID 103 and 105.

    D

    The statement fails because there is more than one row matching the employee name Smith.

    E

    The statement fails because there is more than one row matching the IT_ADMIN job ID in the EMPLOYEES table.

    F

    The statement fails because there is no 'Administration' department in the DEPARTMENTS table.


    正确答案: A
    解析: 暂无解析

  • 第12题:

    单选题
    You are implementing an ASP.NET MVC 2 application. In the Areas folder, you add a subfolder named Product to create a single project areA.  You add files named ProductController.vb and Index.aspx to the appropriate subfolders.  You then add a file named Route.vb to the Product folder that contains the following code.01 Public Class Route  Inherits AreaRegistration02  03 Public Overrides ReadOnly Property AreaName As String04 Get  05 Return "product"06 End Get  07 End Property08  09 Public Overrides Sub RegisterArea(ByVal context As AreaRegistrationContext)10  11 context.MapRoute("product_default", "product/{controller}/{action}/{id}", New With {.controller = "Product", .action = "Index",.id = ""})12  13 End Sub  End Class  When you load the URL http:///product, you discover that the correct page is not returned. You need to ensure that the correct page is returned. What should you do?()
    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()


    正确答案: C
    解析: 暂无解析

  • 第13题:

    对于这个url定义:urlpatterns=[path(’<int:question_id>/’,views.detail)],视图函数detail该如何拿到url中传入的question_id?()

    • A、通过request.url获取
    • B、通过视图函数参数获取
    • C、通过request.REQUEST获取
    • D、通过request.META获取

    正确答案:B

  • 第14题:

    如果需要显示id为1的联系人信息,Intent中的Action属性与Data属性应该设定为什么?()。

    • A、ACTION_VIEW content://contacts/people/1
    • B、ACTION_DIAL content://contacts/people/1
    • C、ACITON_EDIT content://contacts/people/1
    • D、ACTION_CALL content://contacts/people/1

    正确答案:A

  • 第15题:

    在本窗口打开超链接的代码是()

    • A、<a href=URL target=_top>..</a> 
    • B、<a href=URL target=_parent>..</a> 
    • C、<a href=URL target=_blank>..</a> 
    • D、<a href=URL target=_self>..</a>

    正确答案:D

  • 第16题:

    在HTML中,< form action=? >,action表示()

    • A、提交的方式
    • B、表单所用的脚本语言
    • C、提交的URL地址
    • D、表单的形式

    正确答案:C

  • 第17题:

    Struts中标记库的描述正确的是()     

    • A、Bean标记用来在JSP页中管理bean
    • B、Logic标记用来在JSP页中控制流程
    • C、HTML标记用来生成HTML标记,在表单中显示数据
    • D、模板标记使用动态模板构造普通格式的页,使用会话ID对URL进行编程

    正确答案:A,B,C

  • 第18题:

    以下做法中,哪些可以提高网站分析的数据准确性?()

    • A、检查网页中监测代码的完整性及可执行性
    • B、对网站中存在的重定向URL进行数据监测及传递测试
    • C、拒绝使用异步监测代码技术
    • D、在分析中优先使用访问级指标,尽量避免使用独立访客级指标

    正确答案:A,B,D

  • 第19题:

    在框架页中的主框架中打开链接的代码是()

    • A、<a href=URL target=_left>..</a> 
    • B、<a href=URL target=_blank>..</a> 
    • C、<a href=URL target=_top>..</a> 
    • D、<a href=URL target=_main>..</a>

    正确答案:D

  • 第20题:

    You are implementing an ASP. NET MVC 2 Web application. You add a controller named Company Controller. You need to modify the application to handle the URL path /company/info. Which two actions should you perform?()

    • 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,D

  • 第21题:

    单选题
    In an automation system, the effect of a control action sensed by a controller is known as ()
    A

    command input

    B

    set point signal

    C

    output

    D

    feedback


    正确答案: D
    解析: 暂无解析

  • 第22题:

    单选题
    From the passage, we can learn that the simplest controller action is()
    A

    two-step controller action

    B

    proportional, controller action

    C

    integral controller action

    D

    derivative controller action


    正确答案: A
    解析: 暂无解析

  • 第23题:

    单选题
    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?()
    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)


    正确答案: B
    解析: 暂无解析

  • 第24题:

    单选题
    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}"} )


    正确答案: C
    解析: 暂无解析