gpt4 book ai didi

c# - 在没有完整回发的情况下获取查询字符串值

转载 作者:行者123 更新时间:2023-11-30 12:52:00 25 4
gpt4 key购买 nike

我有一个页面,其中左栏包含类别列表,右栏将显示从左侧选择特定类别的相应项目

每个类别列表都包含一个超链接,其导航 url 包含查询字符串值。

单击链接后,我会在右侧列出与查询字符串值匹配的项目

问题是:我想阻止完整的回发,同时要捕获查询字符串值,否则我将无法获得正确的项目列表。

我使用了更新面板,但完整的回发又发生了。

有没有办法在没有完整回发的情况下获取查询字符串值???

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>

<div class="rightsec">

<h5>Categories</h5>
<asp:Accordion ID="Accordion1" runat="server">
<Panes>
<asp:AccordionPane ID="AccordionPane1" runat="server">
<Header>
<h4>
Electronics</h4>
</Header>
<Content>
<div class="rightsec_content">
<ul>
<li>
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="show_products.aspx?category=Electronics&sub_category=Cameras Accessories">Camera Accessories</asp:HyperLink>

</li>

</ul>
</div>
</Content>
</asp:AccordionPane>

</asp:Accordion>
</div>

</ContentTemplate>
</asp:UpdatePanel>


<asp:UpdateProgress ID="UpdateProgress1" runat="server"
AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<table align="center">
<tr>
<td>
<asp:Image ID="Image1" runat="server" ImageUrl="~/staticimages/progress_bar_animated (1).gif"
ImageAlign="Top" />
</td>
</tr>
</table>

</ProgressTemplate>
</asp:UpdateProgress>

最佳答案

嗯,是的,你可以做到,但这不是一件容易的事..

您需要编写一些 JQUERY 并且必须使用 AJAX。

使用它您可以轻松实现这一目标。

我不太熟悉这个,但我知道这可以使用 AJAX 和 JQUERY 来完成。

可能还需要在您的项目中添加一些 Web 服务来实现此目的。

此链接可以帮助您http://api.jquery.com/jQuery.ajax/ .

关于c# - 在没有完整回发的情况下获取查询字符串值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5578260/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com