为什么CheckBoxList 的某一项的属性 不保持状态值呢?
于娜 2008-07-06 11:08:05 namespace WebApplication1
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
CheckBoxList1.Items[0].Attributes["my"] = "yuna123";
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write(CheckBoxList1.Items[0].Attributes["my"]);
}
}
}
提交后为什么不显示 attributes["my"] ???