ASP .NET Gridview проблемы с подкачкой страниц с Javascript - PullRequest
1 голос
/ 13 июня 2011

У меня возникла проблема при нажатии на номер страницы в моем виде сетки ASP .NET. Когда я нажимаю другой номер страницы, я перенаправляюсь на другую не связанную страницу в моем проекте.

Это не было проблемой, пока я не добавил jQuery на свою главную страницу, поэтому я предполагаю, что в коде javascript есть какой-то конфликт. Когда вышеупомянутое перенаправление происходит, событие PageIndexChanging не запускается, и, насколько я могу судить, обратной передачи не происходит.

Кто-нибудь еще сталкивался с этим? Код ниже:

<head runat="server">
<title>Vinformative</title>
<link href="style2.css" rel="stylesheet" type="text/css" media="screen" />
<link href="/favicon.ico" rel="shortcut icon" />
<meta property="og:title" content="Vinformative" />
<meta property="og:type" content="company" />
<meta property="og:url" content="http://www.vinformative.com" />
<meta property="og:image" content="http://www.vinformative.com/imgs/WEBLogoReverse480x186.png" />
<meta property="og:site_name" content="Vinformative" />
<meta property="fb:admins" content="6990" />

<script type="text/javascript" src='<%= ResolveUrl("~/js/jquery-1.4.2.min.js") %>'></script>
<script type="text/javascript" src='<%= ResolveUrl("~/js/jquery.tabSlideOut.v1.3.js") %>'></script>

<script type="text/javascript">
    var directory_root = 'http://localhost:1485/Vinformative.com/'
    $(function() {
        $('.slide-out-div').tabSlideOut({
            tabHandle: '.handle',                     //class of the element that will become your tab
            pathToTabImage: directory_root + 'imgs/handle.gif', //path to the image for the tab //Optionally can be set using css
            imageHeight: '122px',                     //height of tab image           //Optionally can be set using css
            imageWidth: '40px',                       //width of tab image            //Optionally can be set using css
            tabLocation: 'left',                      //side of screen where tab lives, top, right, bottom, or left
            speed: 300,                               //speed of animation
            action: 'click',                          //options: 'click' or 'hover', action to trigger animation
            topPos: '200px',                          //position from the top/ use if tabLocation is left or right
            leftPos: '20px',                          //position from left/ use if tabLocation is bottom or top
            fixedPosition: false                      //options: true makes it stick(fixed position) on scroll
        });
        $('#content').load(directory_root + 'winesearch.aspx');
    });


</script>



<style type="text/css" media="screen">
    .slide-out-div
    {
        padding: 20px;
        width: 400px;
        height: 310px;
        background: #f2f2f2;
        border: #29216d 2px solid;

    }
</style>


<asp:ContentPlaceHolder ID="head" runat="server">


</asp:ContentPlaceHolder>

Мой информатив Поиск вина Загрузить контент Добавить вино телега Профиль Выход

        <%--anonymous users--%>
        <asp:HyperLink runat="server" ID="lnkWhoWeare" NavigateUrl="~/WhoWeAre.aspx">What is Vinformative?</asp:HyperLink>
        <asp:HyperLink runat="server" ID="lnkWhatWeDo" NavigateUrl="~/WhatWeDo.aspx">What We Do</asp:HyperLink>
        <asp:HyperLink runat="server" ID="lnkLogin" NavigateUrl="~/Login.aspx">Login</asp:HyperLink>
        <asp:HyperLink runat="server" ID="lnkNews" NavigateUrl="~/News.aspx">News</asp:HyperLink>
        <asp:HyperLink runat="server" ID="lnkAbout" NavigateUrl="~/AboutUs.aspx">About Us</asp:HyperLink>

    </div>
    <%--end header links--%>
    <br />
    <br />

    <div align="center">
        <asp:Image ID="imgLogo" runat="server" AlternateText="logo" ImageUrl="~/imgs/WEBLogoReverse480x186.png" Width="480px" Height="186px" style="" Visible="false" />
    </div>
    <form id="form1" runat="server">
    <div>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
        </asp:ContentPlaceHolder>
    </div>
    </form>
    <div id="footer">
        <asp:HyperLink runat="server" ID="lnkWho2" NavigateUrl="~/WhoWeAre.aspx" Visible="false">What is Vinformative?</asp:HyperLink>
        <asp:HyperLink runat="server" ID="lnkWhat2" NavigateUrl="~/WhatWeDo.aspx" Visible="false">What We Do</asp:HyperLink>
        <asp:HyperLink runat="server" NavigateUrl="~/TOU.aspx#TOU" ID="lnkTOU">Terms of Use</asp:HyperLink>
        <asp:HyperLink runat="server" NavigateUrl="~/TOU.aspx#Privacy" ID="lnkPrivacyPolicy">Privacy Policy</asp:HyperLink>
        <asp:HyperLink runat="server" NavigateUrl="~/News.aspx" ID="lnkNews2" Visible="false">News</asp:HyperLink>
        <asp:HyperLink runat="server" NavigateUrl="~/AboutUs.aspx" ID="lnkAbout2" Visible="false">About Us</asp:HyperLink>
        <asp:HyperLink runat="server" NavigateUrl="mailto:info@vinformative.com" ID="lnkContact">Contact</asp:HyperLink>
        <br />

        <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>

        <fb:like href="http://www.facebook.com/pages/Vinformative/196975033650925" layout="button_count"
            show_faces="false" colorscheme="dark"></fb:like>
        <a target="_blank" href="http://www.twitter.com/Vinformative">
            <img style="display: inline; position: relative; top: -2px" src="http://twitter-badges.s3.amazonaws.com/t_mini-b.png"
                alt="Follow Vinformative on Twitter" border="0" width="18" height="18" valign="middle" /></a>
        &nbsp; Copyright © 2011 Vinformative, Inc. All rights reserved.
    </div>
    <!-- end #footer -->
</div>


<div class="slide-out-div">
    <a class="handle" href="http://link-for-non-js-users">Content</a>

    <div id="content">


    </div>
</div>

1 Ответ

0 голосов
/ 28 июля 2011

Возможно, вам нужно использовать параметр jQuery.noConflict ().По существу, ошибка $ token, используемая jQuery и из памяти также в ajax-скриптах ATLAS.Попробуйте добавить исправление jQuery.noConflict () (документы http://api.jquery.com/jQuery.noConflict/)

Кроме того, это может указывать на старые версии ...

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...