本文介绍了如何检查李点击事件code后面使用asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有列表里,我想知道哪个选项中单击以code behind.How我可以尽可能

I have list li,I want to know which option in clicked to code behind.How can i possible

<ul class="mega-select__sort">
 <li class="filter-wrap"><a href="#" id="loc" class="mega-select__filter filter--active" runat="server" data-filter='location'>Location</a></li>
 <li class="filter-wrap"><a href="#" id="cine" class="mega-select__filter" runat="server" data-filter='cinema'>Cinema</a></li>
</ul>

有两种选择一种是位置,另一个是cinema.I想知道被点击该选项,code后面..

there are two options one is location and another one is cinema.I want to know which option was clicked to code behind..

推荐答案

使用中继器或DataList控件列出&LT;立GT; 标记。在&LT;立GT; 采取的LinkBut​​ton。然后用itemcommand方法来处理它。

Use repeater control or Datalist control to list the <li> tag. Inside <li> take linkbutton. then use itemcommand method to handle it

这篇关于如何检查李点击事件code后面使用asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 13:25