如何获取后台动态控件的值
在后台我是这样添加控件的
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Response.Write(quyu_shiyonglv());
}
}
public string quyu_shiyonglv()
{
string strBody = null;
strBody += "<ul>";
strBody += " <li>";
strBody += " <input type='checkbox' id='1' /><a href='http://baidu.com'>1</a><select id='ass'runat='server'><option value='1'>21a</option>";
strBody += "<option value='1'>22a</option></select>";
strBody += " <ul>";
strBody += " <li>4";
strBody += " <ul>";
strBody += " <li>5 </li>";
strBody += " </ul>";
strBody += " </li>";
strBody += " </ul>";
strBody += " </li>";
strBody += "</ul>";
strBody += " ---------------------------------------------- ";
return strBody;
}
}
然后我添加个后台事件
protected void btn_Click(object sender, EventArgs e)
{
这里怎么获取上面控件的值;
}