Implementing IPostBackDataHandler, once and for all

by timvasil 10/30/2007 4:58:00 PM

I always forget exactly what I need to do to implement IPostBackDataHandler correctly, so I'm tracking the steps here for future reference.

  1. Implement the IPostBackDataHandler interface.
  2. Override OnPreRender call Page.RegisterRequiresPostBack(this);.
  3. Override Render and write the form fields you need posted back.
  4. In LoadPostData, grab the data you posted back.  The postDataKey arg is the same as the ClientID and is generally not useful.

Tags:

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading


Search

Calendar

«  May 2012  »
SuMoTuWeThFrSa
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

Recent comments

Archive