Last post Sep 21, 2010 03:11 AM by CruzerB
Sep 20, 2010 03:45 AM|dominicshaw|LINK
I am writing a server control and need to implement postback. It is a simple calendar control - it renders a textbox and a button using the override of RenderContents which pops up a asp:Calendar control in a new window (written separately to the control)
I just want the TextBox to keep it's value on postback. I inherit from WebControl rather than from TextBox as I thought it would be nice to have a greater level of control but if inheriting from TextBox is better practice I'd be interested instead for guidance
on how to add to the render rather than overwrite it altogether (to add a button).
I'm not in the habit of writing such general questions but what I haven't been able to find is some decent resources to put me on the right path.
I've been looking at
http://msdn.microsoft.com/en-us/library/aa720415(v=VS.71).aspx but can't get it working (I think I've implemented everything they say in the article, other than that I am using a different render method, but it doesn't change anything).
Does anyone have any simple examples or resources they could point me at to help?
Thanks in advance,
Sep 21, 2010 03:11 AM|CruzerB|LINK
If you are required me on the coding, please post your client side script on how you trigger the postback and your server side code on how you handle the postback.