日期:2014-05-17  浏览次数:20485 次

MVC 表单提交
@{
    ViewBag.Title = "LoginRegister";
}

<script src="~/jquery-easyui-1.3.5/jquery.min.js"></script>
<script src="~/jquery-easyui-1.3.5/jquery.easyui.min.js"></script>
<link href="~/jquery-easyui-1.3.5/themes/icon.css" rel="stylesheet" />
<link href="~/jquery-easyui-1.3.5/themes/default/easyui.css" rel="stylesheet" />

//点了提交没反应
@using (Html.BeginForm("LoginRegister","Login", FormMethod.Post))
{
    
    <div class="easyui-window" title="Login" style="width:300px;height:200px;">
        <table style="width: 100%;">
            <tr>
                <td>name:@Html.TextBox("txtname")</td>
            </tr>
            <tr>
                <td>pass:@Html.TextBox("txtpwd")</td>
            </tr>
            <tr>
                <td>
                   <input type="submit" value="OK1" />
                </td>
            </tr>
        </table>
    </div>
}

//可以正常提交
@using (Html.BeginForm("LoginRegister", "Login", FormMethod.Post))

     <input type="submit" value="OK2" />
}

各位大神求解释,谢谢
------解决方案--------------------
你用firebug看看提交时有没有错
  
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/
------解决方案--------------------
easyui样式开头有一句话,是带@符号的,对你的程序有影响,仔细看一下就知道了
------解决方案--------------------
在加个@转义
------解决方案--------------------
你直接用个form表单呗 又没规定一定要用html.beginform