本文介绍了Asp.net jquery导航错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 您好, i使用主题到我的网站。 但是我有导航问题。 当我点击按钮进入我的网站时,通常按钮点击动作将起作用,但是 它导航到我: HTTP://本地主机:44152 / Find.aspx ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl00%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl07%24txtAdet = 1&安培; ctl00%24Co ntentPlaceHolder1%24dlstUrunler%24ctl07%24btnSepeteAt.x = 129&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl07%24btnSepeteAt.y = 39&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl14%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl01%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl08%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl15%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl02%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl09%24txtAdet = 1&安培; ctl00% 24ContentPlaceHolder1%24dlstUrunler%24ctl16%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl03%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl10%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl17%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1% 24dlstUrunler%24ctl04%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl11%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl18%24txtAdet = 1&安培; ctl00 %24ContentPlaceHolder1%24dlstUrunler%24ctl05%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl12%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl19%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl06%24txtAdet = 1&安培; ctl00%24ContentPlaceHolder1 %24dlstUrunler%24ctl13%24txtAdet = 1& ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl20%24txtAdet = 1 [ ^ ] 如何解决这个问题? 我的aspx:Hello,i use theme to my website.but i have a problem about navigation.when i click button to my website,normally the button click action will works,howeverits navigate to me to the:http://localhost:44152/Find.aspx?ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl00%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl07%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl07%24btnSepeteAt.x=129&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl07%24btnSepeteAt.y=39&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl14%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl01%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl08%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl15%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl02%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl09%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl16%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl03%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl10%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl17%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl04%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl11%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl18%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl05%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl12%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl19%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl06%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl13%24txtAdet=1&ctl00%24ContentPlaceHolder1%24dlstUrunler%24ctl20%24txtAdet=1[^]how can i fix this problem?my aspx:<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <form id="form1"> <div> <asp:DataList ID="dlstUrunler" runat="server" RepeatColumns="3" DataKeyField="urunid" Width="507px" OnItemCommand="dlstUrunler_ItemCommand" > <ItemTemplate> <div style="text-align:center"> <asp:Label ID="lblUrunAd" runat="server" Text='<%#Eval("urunad") %>'></asp:Label><br /> <asp:ImageButton ID="ImgResim" runat="server" AlternateText='<%#Eval("urunad") %>' ImageUrl='<%#Eval("urunresimyolu1") %>' Width="100px" Height="120px" CommandName="detay" CommandArgument='<%#Eval("urunid") %>' /><br /> <asp:Label ID="lblUrunFiyat" runat="server" Text='<%#Eval("urunfiyat", "{0:N}") %>'></asp:Label> <asp:TextBox ID="txtAdet" Text="1" TextMode="Number" runat="server" Width="30px"></asp:TextBox><br /> <asp:ImageButton ID="btnSepeteAt" runat="server" ImageUrl="/images/sepeteekle.png" CommandName="sepet" CommandArgument='<%#Eval("urunid") %>'/> </div> </ItemTemplate> </asp:DataList></div> </form></asp:Content> 我的桅杆页面aspx:my master page aspx:<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MasterPage.master.cs" Inherits="WebEc.MasterPage" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <link href="http://fonts.googleapis.com/css?family=Lato:300,400,400italic,600,700|Raleway:300,400,500,600,700|Crete+Round:400italic" rel="stylesheet" type="text/css" /><link rel="stylesheet" href="css/bootstrap.css" type="text/css" /><link rel="stylesheet" href="style.css" type="text/css" /><link rel="stylesheet" href="css/dark.css" type="text/css" /><link rel="stylesheet" href="css/font-icons.css" type="text/css" /><link rel="stylesheet" href="css/animate.css" type="text/css" /><link rel="stylesheet" href="css/magnific-popup.css" type="text/css" /><link rel="stylesheet" href="css/responsive.css" type="text/css" /><meta name="viewport" content="width=device-width, initial-scale=1" /><!-- External JavaScripts============================================= --><script type="text/javascript" src="js/jquery.js"></script><script type="text/javascript" src="js/plugins.js"></script><!-- Document Title============================================= --> <title></title> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder></head><body class="stretched"> <form id="form1" runat="server"> <!-- Document Wrapper============================================= --> <div id="wrapper" class="clearfix"> <!-- Top Bar ============================================= --> <div id="top-bar"> <div class="container clearfix"> <div class="col_half col_last fright nobottommargin"> <!-- Top Links ============================================= --> <div class="top-links"> </div><!-- .top-links end --> </div> </div> </div><!-- #top-bar end --> <!-- Header ============================================= --> <header id="header" class="transparent-header semi-transparent full-header"> <div id="header-wrap"> <div class="container clearfix"> <div id="primary-menu-trigger"></div> <!-- Logo============================================= --> <div id="logo"> <a href="Default.aspx" class="standard-logo" data-dark-logo="images/logo-dark.png"> <img src="images/logo.png" alt="Canvas Logo"></a> <a href="Default.aspx" class="retina-logo" data-dark-logo="images/[email protected]"> <img src="images/[email protected]" alt="Canvas Logo"></a> </div> <!-- #logo end --> <!-- Primary Navigation============================================= --> <nav id="primary-menu" class="style-4"> <ul> <li id="Anasayfa" class="current"> <a href="Default.aspx"> <div>Anasayfa</div> </a> <ul> <li> </li> </ul> </li> <li id="Urunler"> <a href="default.aspx"> <div>Ürünler</div> </a> </li> <li id="Login"> <a href="Login.aspx"> <div>Kayıt Ol</div> </a> </li> <li id="AboutUs"> <a href="shop.html"> <div>Hakkımızda</div> </a> </li> <li id="Contact"> <a href="Contact.aspx"> <div>İletisim</div> </a> </li> </ul> <!-- Top Cart ============================================= --> <div id="top-cart"> <a href="#" id="top-cart-trigger"><span> <asp:Label ID="Label1" runat="server" Text="0"></asp:Label></span></a> <div class="top-cart-content"> <div class="top-cart-title"> </div> <div class="top-cart-items"> <div class="top-cart-item clearfix"> </div> </div> <div class="top-cart-action clearfix"> <span class="fleft top-checkout-price"> <asp:Label ID="Label2" runat="server" Text="0 TL"></asp:Label></span> <asp:Button ID="btnSepet" runat="server" Text="Sepeti Göster" CssClass="button button-3d button-small nomargin fright" /> </div> </div> </div> <div id="top-search"> <a href="#" id="top-search-trigger"></a> <form action="search.aspx" method="get"> <asp:TextBox ID="txtSearch" runat="server" CssClass="form-control" Text="Arama Yapmak İçin Entera Basınız" ForeColor="Gray"></asp:TextBox> </form> </div> <!-- #top-search end --> </nav> <!-- #primary-menu end --> </div> </div> </header><!-- #header end --> <section id="content"> <div class="content-wrap"> <div class="container clearfix"> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </div> </section> </div><!-- #wrapper end --> <script type="text/javascript" src="js/functions.js"></script> </form></body></html> What I have tried: move the button to the begining to the cs and its works fineWhat I have tried:move the button to the begining to the cs and its works fine推荐答案Remove <form id=\"form1\"> from your <asp:Content>. You already have a form in the master page, and you cannot have nested forms.Remove <form id="form1"> from your <asp:Content>. You already have a form in the master page, and you cannot have nested forms. 这篇关于Asp.net jquery导航错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-13 10:24