问题描述
- .net后台添加asp.net控件,我这样子写出错
-
string[] str2=dt.Rows[0]["timu"].ToString().Split('|'); string[] str1=dt.Rows[0]["selectxx"].ToString().Split('_'); string str = ""; for (int i = 0; i < str2.Length; i++) { string[] arr = str1[i].ToString().Split(','); str += "<asp:Panel Visible='true' runat='server'>"; str += " <asp:Label runat='server' text='" + str2[i].ToString() + "'><asp:Label>;"; str += " <asp:RadioButtonList ID='rbl1' runat='server' RepeatDirection='Horizontal'>"; for (int m = 0; m < arr.Length; m++) { str += "<asp:ListItem>" + arr[m].ToString() + "</asp:ListItem>"; } str += "</asp:RadioButtonList><br />"; str += " 建议:<br /> <asp:TextBox ID='jy1' TextMode='MultiLine' Width='600px' runat='server' Height='84px'></asp:TextBox></asp:Panel> <br />"; //str += "<tr><td</td></tr>"; } this.rst.InnerHtml=str;
解决方案
时间: 2024-10-02 07:51:00