关于DataList嵌入DropDownList的问题
DataList 的ItemTemplate放入DropDownList我现在想做的是,点击DropDownList 时取得该行的ID(数据库里取到的ID)
试了很久没结果。。哪位帮帮?谢谢 --------------------编程问答-------------------- 点击DropDownList取得该行的ID???
将该行的ID主键绑定到DropDownList,还是你有其他什么想法?? --------------------编程问答--------------------
也可以把主键放在一个隐藏的Lable中。。。用Findcontrol去找控件。。得到值 --------------------编程问答--------------------
如何知道我是选择了哪行上的DropDownList呢? --------------------编程问答-------------------- 设置那个DropDownList 的 FileValue='<%#Eval("数据库里取到的ID")' --------------------编程问答--------------------
把A标签 换成DropDownList --------------------编程问答-------------------- DEMO
<asp:DataList ID="dlCaseList" runat="server" RepeatColumns="2" RepeatDirection="Horizontal"
Width="100%" HorizontalAlign="Center">
<ItemTemplate>
<div class="cpzspic">
<div class="pic">
<a href='ALZS.aspx?proid=<%# Eval("ID") %>'>
<asp:Image ID="Image1" runat="server" AlternateText='<%# Eval("ProductName") %>'
ImageUrl='<%# Eval("ProductPhoto1") %>' Width="280" Height="210" border="0" /></a></div>
<div class="txt">
<a href='ALZS.aspx?proid=<%# Eval("ID") %>'><span style="color: black">
<asp:Label ID="Label1" runat="server" Text='<%# StringOperating.NoHTML(Eval("ProductName").ToString(),20) %>'></asp:Label></span></a>
</div>
</div>
</ItemTemplate>
</asp:DataList>
补充:.NET技术 , ASP.NET