Last post Sep 19, 2011 06:57 PM by AliAsObject
Aug 31, 2008 12:56 PM|bhav27|LINK
I am developing custom control and want to add autopostback feature to it. I thought of implementing IPostBackEventHandler but this seems not working.
Aug 31, 2008 05:15 PM|jkirkerx|LINK
For controls that support it, just set AutoPostBack to True
On controls that don't, add a eventhandler to the control.
Aug 31, 2008 10:25 PM|Peter Bucher|LINK
This isn`t too tricky.
What kind of eventhandler?
Sep 01, 2008 02:00 PM|jkirkerx|LINK
Take the DropDownList for Instance
AddHandler DropDownList.SelectedIndexChanged, Addressof DropDownList_SelectedIndexChanged
You can then add a trigger if needed for update panel container
Sep 01, 2008 02:28 PM|Peter Bucher|LINK
Beside AJAX (or UpdatePanel) and without AutoUpdate, no Event willl occur (no PostBack will occur) if the contro isn`t a native form post element (e.g. Button).
Sep 19, 2011 06:57 PM|AliAsObject|LINK
Simple solution for simple folk - just add this line:
this.AutoPostBack = true;
to the custom control constructor. This saves setting it everytime the control is added to a page.
However, if the control lacks this property, life gets more interesting.