Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 部分视图提交按钮不工作_C#_Asp.net Mvc_Model_Asp.net Mvc Partialview - Fatal编程技术网

C# 部分视图提交按钮不工作

C# 部分视图提交按钮不工作,c#,asp.net-mvc,model,asp.net-mvc-partialview,C#,Asp.net Mvc,Model,Asp.net Mvc Partialview,我的问题是,提交按钮不起作用。如您所见,我的局部视图包含jquery模式。如果单击“mdlist”,模式将显示,并显示submit按钮 你能告诉我可能的问题是什么吗 @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">

我的问题是,提交按钮不起作用。如您所见,我的局部视图包含jquery模式。如果单击“mdlist”,模式将显示,并显示submit按钮

你能告诉我可能的问题是什么吗

@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>
@model IEnumerable
@DisplayNameFor(model=>model.Name)
@foreach(模型中的var项目)
{
@DisplayFor(modelItem=>item.Name)
}
$(函数(){
$(“#对话框”)。对话框({
自动打开:错误,
身高:400,
宽度:670,
莫代尔:是的,
closeOnEscape:没错,
可调整大小:false
});

首先,您需要通过以下方式添加
表单
(提交按钮仅在有表单时有效)

接下来,如果您有一个数组,您添加
复选框的方式不正确,请查看链接

@using(@Html.BeginForm()){ 
//place your html elements and submit button here 
}