13306511495
DList中的DataKeyField使用方法:

1:<asp:DataList id="DList" runat="server" Width="100%" DataKeyField="GalleryId">
指定好DataKeyField到DataList控件中

2在程序中使用:
foreach(DataListItem item in DList.Items)
   {
    if(((System.Web.UI.WebControls.CheckBox)item.FindControl("ckbSelect")).Checked)
    {
     Response.Write(DList.DataKeys[item.ItemIndex].ToString());
    }
   }

二步工作

分类:

技术点:

相关文章:

  • 2021-11-29
  • 2021-12-31
  • 2022-01-08
  • 2021-06-09
  • 2021-05-05
  • 2021-11-30
  • 2021-06-09
  • 2021-12-20
猜你喜欢
  • 2021-11-17
  • 2021-12-04
  • 2021-12-05
  • 2021-12-10
  • 2021-12-10
  • 2021-12-10
  • 2021-12-19
相关资源
相似解决方案