C# 以模态方式打开局部视图,但不处于静态状态
我正试图根据用户要执行的操作打开一个模式窗口 标记如下所示:C# 以模态方式打开局部视图,但不处于静态状态,c#,jquery,asp.net,asp.net-mvc,twitter-bootstrap,C#,Jquery,Asp.net,Asp.net Mvc,Twitter Bootstrap,我正试图根据用户要执行的操作打开一个模式窗口 标记如下所示: <table class="table table-hover"> <thead> <tr> <th>@Html.DisplayNameFor(model => model.Name)</th> <th>@Html.DisplayNameFor(model => model.De
<table class="table table-hover">
<thead>
<tr>
<th>@Html.DisplayNameFor(model => model.Name)</th>
<th>@Html.DisplayNameFor(model => model.Description)</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
<button type="button" class="btn btn-default" onclick="location.href='@Url.Action("Create", "User")'">Action</button>
</td>
</tr>
}
</tbody>
</table>
@DisplayNameFor(model=>model.Name)
@DisplayNameFor(model=>model.Description)
@foreach(模型中的var项目)
{
@DisplayFor(modelItem=>item.Name)
@DisplayFor(modelItem=>item.Description)
行动
}
是否有人有办法根据是板条箱操作还是其他操作来弹出局部视图?这里有一个很好的参考,介绍如何将MVC和模态表单结合起来。基本上,它基于Azim的建议,但提供了一个完整的堆栈解决方案(即详细说明如何处理错误、在服务器上执行操作等):
也许你的问题事实上是重复的。这是辩护!非常感谢你!!!