Willem Odendaal

the coder's point of view

<November 2008>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456


Navigation

I Read

Subscriptions

Post Categories



Monday, November 08, 2004 - Posts

LoadPostData doesn't fire

I've struggled with this a couple of times, but I think I've got it figured out now. When I implement IPostBackDataHandler on my ASP.NET server control, my LoadPostData event doesn't get hit. This is because I haven't read the MSDN documentation properly.

For a ASP.NET server control to handle postback data correctly, it has to meet the following criteria.
1. The class must implement IPostBackDataHandler.
2. Implement LoadPostData to load the form data. 
3. The name (not the ID!) of one of the html controls it renders must exactly match the UniqueID of the control (I always forget this one).
4. Implement RaisePostDataChangedEvent.

Not too tricky.

posted Monday, November 08, 2004 1:40 AM by willemo




Powered by Dot Net Junkies, by Telligent Systems