在ASP.NETMVC中,创建分部视图的三个步骤是()。
A.在控制器目录中右键创建视图
B.右键点击/Views/Shared目录,选择“添加”-“MVC5分布页(Razor)”
C.设定“视图名称”为“_top”,并选中“创建为分部视图”
D.在新建的_top.cshtml中输入页面内容。
A.在控制器目录中右键创建视图
B.右键点击/Views/Shared目录,选择“添加”-“MVC5分布页(Razor)”
C.设定“视图名称”为“_top”,并选中“创建为分部视图”
D.在新建的_top.cshtml中输入页面内容。
第2题
A.Html.DisplayFor()
B.Html.ListBox()
C.Html.EditorFor()
D.以上都不支持
第4题
A.View
B.Data
C.ViewDataDictionary
D.DataDictionary
第6题
rstController:Controller{publicActionResultIndex(){returnView();}}
A.其默认视图页面为:/View/Index.cshtml
B.其默认视图页面为:/Index.cshtml
C.其默认视图页面为:/Views/MyFirst/Index.cshtml
D.其默认视图页面为:/Views/Action/Index.cshtml
第7题
A.View在action中返回的是一个视图。
B.只能使用View,如returnview()
C.Partialview,它是在action中返回一部分视图。
D.Redirecttoaction.它是用来重定向到不同的action里面,它可以在一个controller里面也可以在不同的controller里面
第8题
A.Html.BeginForm用于创建普通的表单标签。
B.Ajax.BeginForm方法创建的是异步表单。
C.提交到当前页面,提交方式为Post,异步更新模块ID为UserLogOnContainer的定义如下:Ajax.BeginForm(newAjaxOptions{UpdateTargetId="UserLogOnContainer",HttpMethod="Post",OnSuccess=""})
D.提交到指定控制器下的操作方法,提交方式为Post,异步更新模块ID为UserLogOnContainer,定义如下:Ajax.BeginForm("controller","action",null,newAjaxOptions{UpdateTargetId="UserLogOnContainer",HttpMethod="Post",OnSuccess=""})
第9题
A.Views文件夹存储的是与应用程序显示(用户界面)相关的文件(HTML文件)
B.Views文件夹中包含每个控制器对应的一个文件夹。
C.Views文件夹存储的文件可能扩展名只能是aspx
D.Shared文件夹用于存储控制器间分享的视图(母版页和布局页)。
第11题
A.createviewview_basselect*fromtable_a.
B.createview_basselect*fromtable_a
C.createviewview_bforselect*fromtable_a
D.createview_bforselect*fromtable_a