Re: IPostBackDataHandler.LoadPostData does not fire on empty postDataKey form fields -
03-04-2004
, 01:46 PM
Hi,
if I recall correctly, if you call Page.RegisterRequiresPostBack with
reference to the control itself, you'll get LoadPostdata to be called
despite if control actually posts something to the server (as is case when
checkbox is not selected, no value is posted). You'd call this from the
control itself to make sure everything works smoothly.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Roy Hodges" <admin (AT) aikido-shobukan (DOT) org> wrote
After creating a custom MultiSelectBox that has a checkbox list, i noticed
that the control wasn't updating it's selected listitems when no checkboxes
were selected. After inserting a Response.Write(postDataKey) in the
LoadPostData(...) method, I noticed that LoadPostData is not called when the
field is empty! It is called properly when and only when there is a value in
the field associated with the postDataKey.
I'm going to try creating a dummy field with text in it to force
LoadPostData to fire. |