【发布时间】:2015-02-16 00:58:45
【问题描述】:
我的问题是,提交按钮不起作用。如您所见,我的局部视图包含一个 jquery 模式。如果您单击“mdlist”,模态将与提交按钮一起出现。
你能告诉我可能的问题吗?
@model IEnumerable<MyApp.Models.Participant>
<link type="text/css" rel="stylesheet" href="http://code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.11.3/jquery-ui.js"></script>
<a id="mdlist" class="button" href="#"><span class="new icon"></span>Add Participant</a>
<div id="dialog" class="content-wrapper">
<div class="buttons">
<input type="submit" name="submitButton" value="Save" class="button save icon" />
</div>
<table cellspacing="0">
<thead>
<tr>
<th>
</th>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
</tr>
</thead>
@foreach (var item in Model)
{
<tbody>
<tr>
<td>
<input type="checkbox" name="ParticipantCheck" id="@item.ID" />
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
</tr>
</tbody>
}
</table>
</div>
<script type="text/javascript">
$(function () {
$("#dialog").dialog({
autoOpen: false,
height: 400,
width: 670,
modal: true,
closeOnEscape: true,
resizeable: false
});
</script>
【问题讨论】:
标签: c# asp.net-mvc model asp.net-mvc-partialview