Custom Control Help...
-
Hi... I am developing a control... a custom drop down list... just give it DataSet and it will do all by itself. I want to catch its SelectedIndexChanged event... its not working... PLEASE HELP ME... me StucK and stucK badly :S
public class My : System.Web.UI.WebControls.WebControl { private DropDownList ls; public My() { ls = new DropDownList(); ls.AutoPostBack = true; ls.EnableViewState = true; } public void BindControl(DataSet ds) { ls.DataSource = ds; ls.DataValueField = "ID"; ls.DataTextField = "Title"; ls.DataBind(); } private void _ApplyFilter(object sender, System.EventArgs e) { **// ITS NOT COMING HERE WHENEVER POST BACK OCCURS :((** } protected override void CreateChildControls() { Controls.Add(ls); } }
--------------------- A gasp of breath, A sudden death: The tale begun. A rustled page Passes an age: The tale is done. -
Hi... I am developing a control... a custom drop down list... just give it DataSet and it will do all by itself. I want to catch its SelectedIndexChanged event... its not working... PLEASE HELP ME... me StucK and stucK badly :S
public class My : System.Web.UI.WebControls.WebControl { private DropDownList ls; public My() { ls = new DropDownList(); ls.AutoPostBack = true; ls.EnableViewState = true; } public void BindControl(DataSet ds) { ls.DataSource = ds; ls.DataValueField = "ID"; ls.DataTextField = "Title"; ls.DataBind(); } private void _ApplyFilter(object sender, System.EventArgs e) { **// ITS NOT COMING HERE WHENEVER POST BACK OCCURS :((** } protected override void CreateChildControls() { Controls.Add(ls); } }
--------------------- A gasp of breath, A sudden death: The tale begun. A rustled page Passes an age: The tale is done.