asp.net mvc:将按钮连接到新页面

时间:2013-05-29 13:24:59

标签: asp.net-mvc

现在,当用户点击按钮SARU时,会调用方法AddGroupSARU。现在我想转到页面Layout.cshtml,因此当用户点击该按钮时,会打开Layout.cshtml

 <button id="SARU" class="btn btn-inverse btn-large">
                        SARU</button>
                    <div class="span1">
                        <button id="AN" class="btn btn-inverse :hover btn-large">
                            AN</button>
                              <script type="text/javascript">
                              $(function(){

                                $('#SARU').click(function () {
                                   $.post("@Url.Action("AddGroupSARU","User")");
                                  });
                                 });
                         </script>
                    </div>

@Html.Partial("~/Views/Shared/Layout.cshtml")在Button页面底部显示Layout,而我想点击按钮转到Layout.cshtml页面。

0 个答案:

没有答案