DataList中有一个input控件  没有runat="server"  <input id="Text1" name="Text1" type="text" />如何在ItemCommand事件中,获取到Text1的value

解决方案 »

  1.   

    设置这个TextBox的CommandName,在ItemCommand事件中判断,
    if(e.CommandName==你写的那个TextBox的CommandName)
         string text=(e.item.findControl("Text1") as TextBox).Text,这样就可以获取啦
    具体自己尝试
      

  2.   

    ++Dim lbUsers_id As Label = CType(e.Item.Cells(7).FindControl("lbl_ddl_lbmc_id"), System.Web.UI.WebControls.Label)
    根据这个找到你想要的
      

  3.   

    没有 runat="server" ,在后台不能访问