选项卡仅呈现第一页

时间:2013-09-24 15:44:31

标签: jquery asp.net webforms

我有一个我正在制作的应用程序,我正在使用jquery选项卡控件进行导航。对于第一页,一切都正确呈现,但第二页对于内容是完全空白的。当我从另一个选项卡导航到第一个选项卡时,第一个选项卡仍然可以正确显示。

这是我的母版页面,其中包含标签

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

    <head id="Head1" runat="server">
        <title></title>
        <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
        <link href="Styles/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
        <script src="Scripts/jquery-1.10.2.js" type="text/javascript"></script>
        <script src="Scripts/jquery-ui-1.10.3.js" type="text/javascript"></script>
        <script src="Scripts/footable.js" type="text/javascript"></script>
        <script src="Scripts/footable.sort.js" type="text/javascript"></script>
        <script src="Scripts/footable.paginate.js" type="text/javascript"></script>
        <link href="Styles/footable.core.css" rel="stylesheet" type="text/css" />
        <link href="Styles/footable.standalone.css" rel="stylesheet" type="text/css" />
        <asp:ContentPlaceHolder ID="HeadContent" runat="server"></asp:ContentPlaceHolder>
        <script type="text/javascript">
            $(function() {
                $(".tabs").tabs();
            });

            $(".tabs").on('click', function() {
                __doPostBack('tabs', '');
            });
        </script>
    </head>

    <body>
        <form id="Form1" runat="server">
            <div class="page">
                <div class="header">
                    <div class="title">
                         <h1>
                    &nbsp;<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/CCLogo.jpg" />
                </h1>

                    </div>
                    <div class="loginDisplay">
                        <asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
                            <LoggedInTemplate>Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>! [
                                <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/" />]</LoggedInTemplate>
                        </asp:LoginView>
                    </div>
                    <div class="clear hideSkiplink">
                        <div id="tabs" class="tabs">
                            <ul>
                                <li><a href="My Audits.aspx">My Audits</a>
                                </li>
                                <li><a href="My Claims.aspx">My Claims</a>
                                </li>
                                <li><a href="Reports.aspx">Reports</a>
                                </li>
                                <li><a href="Maintenance.aspx">Maintenance</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div class="main">
                <asp:ContentPlaceHolder ID="MainContent" runat="server" />
            </div>
            <div class="clear"></div>
            </div>
            <div class="footer"></div>
        </form>
    </body>

</html>

1 个答案:

答案 0 :(得分:0)

我想通了,我删除了下面的功能并且它正常工作。

  $(".tabs").on('click', function() {
            __doPostBack('tabs', '');
        });