[英]Know which list item is clicked on a master page from content page
I have the below unordered list on a master page 我的母版页上有以下无序列表
<ul class="nav nav-second-level" id ="translist">
<li>
<a href="Deposit.aspx">Deposit</a>
</li>
<li>
<a href="Deposit.aspx">Withdrawal</a>
</li>
</ul>
Both will call the same page but based on which item is selected, I will populate the same page with dynamic data and keep that information in asp.net session variable or something to use later at server side. 两者都将调用同一页面,但根据选择的项目,我将在同一页面中填充动态数据,并将该信息保留在asp.net会话变量或稍后在服务器端使用的信息中。 Please assist 请协助
You could use the onclick attribute and specify what to do in javascript 您可以使用onclick属性并在javascript中指定要执行的操作
<a href="Deposit.aspx" onclick="function1()">Deposit</a>
<a href="Deposit.aspx" onclick="function2()">Deposit</a>
then implement function1 & function2 in javascript 然后在javascript中实现function1和function2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.