方法一
在page_load中加
string s =Page.GetPostBackEventReference(dll_TableName);
if (!IsPostBack){
dll_TableName.Attributes.Add("onchange", s);
}
方法二
在控件中加属性 autopostpack=true
本文介绍两种在 ASP.NET 中使 DropDownList 控件在选择更改时触发页面回发的方法:一是通过 Page_Load 事件添加 onchange 属性实现;二是直接设置控件的 AutoPostBack 属性为 true。
在page_load中加
string s =Page.GetPostBackEventReference(dll_TableName);
if (!IsPostBack){
dll_TableName.Attributes.Add("onchange", s);
}

被折叠的 条评论
为什么被折叠?