【问题标题】:Open Partial View as Modal but without being static [duplicate]以模态形式打开部分视图但不是静态的[重复]
【发布时间】:2015-11-15 18:08:25
【问题描述】:

我正在尝试根据用户将要执行的操作打开一个模式窗口。

for example these actions

标记如下所示:

<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>

有没有人有办法根据它是板条箱操作还是其他任何方法来弹出部分视图?

【问题讨论】:

    标签: c# jquery asp.net asp.net-mvc twitter-bootstrap


    【解决方案1】:

    这是一个很好的参考,如何结合 MVC 和模态形式。基本上它基于 Azim 的建议,但提供了一个完整的堆栈解决方案(即详细解释您如何处理错误、在服务器上执行操作等):

    What's the best way to call a modal dialog in ASP.NET MVC using Twitter Bootstrap?

    也许你的问题实际上是那个问题的重复。

    【讨论】:

    • 这绝对是它!非常感谢!!!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-18
    • 2016-05-20
    相关资源
    最近更新 更多