datalist中有一label控件,无法读取其值,怎么办
datalist中有一label控件,绑定了数据
<asp:Label id= "Label3 " runat= "server "> <%#DataBinder.Eval(Container.DataItem, "sdescribe ")%> </asp:Label>
后台无法读取其值,怎么办
Label la = (Label)this.DataList1.Items[e.Item.ItemIndex].FindControl( "Label3 ");
this.Label2.Text = "0000000 "+la.Text+ "000000 ";
------解决方案--------------------你绑定在 <label..> <DataBinder..> </label> 中间
你这句 还用la.Text,那哪取的出来啊 呵呵~~~仔细点儿
this.Label2.Text = "0000000 "+la.Text+ "000000 ";