Last post Nov 15, 2007 10:26 PM by Nai-Dong Jin - MSFT
Nov 14, 2007 04:21 AM|Bridges|LINK
void RenderContents(HtmlTextWriter writer)
foreach (DictionaryEntry de
But when I press linkbutton after postback all controls in each
ProductControl are empty.
What I do wrong and how can I restore data after postback in each
Maybe amybody knows another way to develop a similar collection ? [;)]
Nov 15, 2007 10:26 PM|Nai-Dong Jin - MSFT|LINK
From your description, it seems that you lost all the data after the postback occurs.
I think you forget to make your control inherit from the IPostBackDataHandler interface. If you want a server control you design to examine form data that is posted back to the server by the client, you must implement the IPostBackDataHandler interface.
The contract that this interface defines allows a server control to determine whether its state should be altered as a result of the post back, and to raise the appropriate events.
For more information, see:
Processing Postback Data: