如何从客户端到服务器端获取Href值 [英] How Do I Get Href Value From Client Side To Server Side
本文介绍了如何从客户端到服务器端获取Href值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好:
有人能帮帮我吗?我需要在点击时从href获取服务器端的值,例如点击GO A,得到〜/ webforms / aaaa.aspx并传递到服务器端
Hello to everyone:
Can someone help me? I need to get the value in server side from href when is click , example click on "GO A",get "~/webforms/aaaa.aspx" and pass to server side
<ul runat="server" id="options" class="nav">
<li class="dropdown">
<a id="aaaa" runat="server" href="~/webforms/aaaa.aspx" title="Inicio">GO A</a>
</li>
<li class="dropdown">
<a id="bbbbb" runat="server" href="~/webforms/bbbbb.aspx">GO B </a>
</li>
<li class="dropdown">
<a iid="cccccccc" runat="server" href="~/webforms/cccccccc.aspx">GO C </a>
</li>
<li class="dropdown">
<a id="dddddd" runat="server" href="~/webforms/dddddd.aspx">GO D</a>
</li>
</ul>
我该怎么做?
谢谢
How can I do this?
Thanks
推荐答案
HttpRequest类 [ ^ ]具有各种属性读取当前请求的路径。
例如,AppRelativeCurrentExecutionFilePath
属性 [ ^ ]将为您提供app-relative当前页面的路径 - 例如:〜/ webforms / aaaa.aspx
。
The HttpRequest class[^] has various properties to read the path of the current request.
For example, theAppRelativeCurrentExecutionFilePath
property[^] will give you the app-relative path for the current page - eg:"~/webforms/aaaa.aspx"
.
这篇关于如何从客户端到服务器端获取Href值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文