猿问

如何给内容页当中的DataList内的某一label控件赋值

<SPAN style="FONT-SIZE: 14px"><SPAN id=Content2761013>有一个母版页<B>hi.master </B><FONT color=#7444bb>(代码省略)</FONT> <BR>&nbsp; <BR>代码: <BR>&nbsp; <BR>&nbsp; &lt;div&gt; <BR>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&lt;asp:contentplaceholder id="show" runat="server"&gt; <BR>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&lt;/asp:contentplaceholder&gt; <BR>&nbsp; &nbsp; &lt;/div&gt; <BR>&nbsp; <BR>&nbsp; <BR>有一个内容页<B>smslist.aspx</B> <FONT color=#7444bb>(代码省略)</FONT> <BR>&nbsp; <BR>代码: <BR>&nbsp; <BR>&lt;asp:DataList ID="sendtomeList" runat="server"&gt; <BR>&nbsp; <BR>&lt;asp:label id="bodyshow" runat="server"&gt;&lt;/asp:label&gt; <BR>&nbsp; <BR>&lt;/asp:DataList&gt; <BR><BR>&nbsp; <BR><B>请问,后台的C#如何给这个label赋值?<

MM们
浏览 379回答 2
2回答

杨__羊羊

参考: 如果datalist在contentplaceholder中间,可以先contentplaceholder c=(contentplaceholder)master.fincontrol("");再在c里面找datalist ,找lable 如果在contentplaceholder外面,用master.findcontrol();找datalist ,找lable
随时随地看视频慕课网APP
我要回答