送分的问题?
如下面的ascx页面代码:
<!-- 第一行 -->
<tr>
<td class="cell_center">
<asp:DropDownList ID="ddlOne" runat="server" Width="100%">
</asp:DropDownList>
</td>
<td class="cell_center">
<asp:Label ID="lbOne" runat="server" Width="100%"></asp:Label>
</td>
</tr>
<!-- 第二行 -->
<tr>
<td class="cell_center">
<asp:DropDownList ID="ddlOne" runat="server" Width="100%">
</asp:DropDownList>
</td>
<td class="cell_center">
<asp:Label ID="lbOne" runat="server" Width="100%"></asp:Label>
</td>
</tr>
<!-- 第三行 -->
<tr>
<td class="cell_center">
<asp:DropDownList ID="ddlOne" runat="server" Width="100%">
</asp:DropDownList>
</td>
<td class="cell_center">
<asp:Label ID="lbOne" runat="server" Width="100%"></asp:Label>
</td>
</tr>
页面中有三行,每一行有一个DropDownList和Lable两个服务器控件,想实现的效果是选择DropDownList的某一项时,Lable的Text刷新为选中项的文本!因为如果每次都给DropDownList一个服务器事件的话,每次进行这样的操作页面就得刷新一次,给人体验很不好,我的页面中不止这3行。想写客户端事件进行操作,该table中外面还有外部容器(ID ="WB"),查看了一下生成的Html文档,两个控件的ID都变为了WB_ddlOne,WB_lbOne之类的名称,即:外部容器名_控件名。考虑到该ascx页面不止在一个容器下面被引用,所以想求高人帮忙,有没有获取指定的服务器控件生成为HTML标签后的名称的方法?该事件应该如何写?或者有更好的思路也可以点拨一下小弟!谢谢!