如何在mvc视图中更改表位置? [英] how to change table position in mvc view?

查看:90
本文介绍了如何在mvc视图中更改表位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有模型,控制器和查看其工作正常从db sql.ok获得值

但我想要在视图中更改表位置(Razor)还有一个问题我们能否看到剃刀视图没有运行应用程序的设计



这里是查看(剃须刀)



@model IEnumerable< practicemvc4part2.models .employee>





指数





@ Html.ActionLink(创建新,创建)














@foreach(模型中的var项目){

}

< th align =center>动作

@ Html.DisplayNameFor(model => model.name)

@ Html.DisplayNameFor( model => model.gender)

@ Html.DisplayNameFor(model => model.city)

@ Html.DisplayNameFor(model => model.dob)

@ Html.DisplayFor(modelItem => item.name)



@ Html.DisplayFor(modelItem => item.gender)

@ Html.DisplayFor(modelItem => item.city)

@ Html.DisplayFor(modelItem => ; item.dob)

@ Html.ActionLink(编辑,编辑,新{id = item.id})|

@ Html.ActionLink(详细信息,详细信息,新{id = item.id})|

@ Html.ActionLink(删除,删除,新{id = item.id})





解决方案

页面布局取决于您的HTML / CSS文件,并且要更改布局(网格的位置),您必须更改它们...

Visual Studio不包含Razor渲染引擎的页面设计器。你能得到的最好的东西(自2012年起)是 Page Inspector [ ^ ],2013年有所改进......


i has model,controller and view its working fine getting values from db sql.ok
but i want change table position in view(Razor) and one more question can we able to see razor view design without running application

here is view(razor)

@model IEnumerable <practicemvc4part2.models.employee>


Indexs



@Html.ActionLink("Create New", "Create")








@foreach (var item in Model) {
}
@Html.DisplayNameFor(model => model.name)
@Html.DisplayNameFor(model => model.gender)
@Html.DisplayNameFor(model => model.city)
@Html.DisplayNameFor(model => model.dob)
Action
@Html.DisplayFor(modelItem => item.name)

@Html.DisplayFor(modelItem => item.gender)
@Html.DisplayFor(modelItem => item.city)
@Html.DisplayFor(modelItem => item.dob)
@Html.ActionLink("Edit", "Edit", new { id=item.id }) |
@Html.ActionLink("Details", "Details", new { id=item.id }) |
@Html.ActionLink("Delete", "Delete", new { id=item.id })


解决方案

Page layout is depends on your HTML/CSS files and to change the layout (the position of the grid) you have to alter them...
Visual Studio does not include a page designer for Razor rendering engine. The best thing you can get (since 2012) is the Page Inspector[^], that has been improved in 2013...


这篇关于如何在mvc视图中更改表位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆