Not sure there's a solution for this, but I find it overly difficult to disable the client state field. I'm using HTTP Get for my post, and I have a textbox watermark extender on a field. I don't want the ClientState because it makes my URLs look bad. So I have to set EnableClientState to false BEFORE the client state hidden control is actually set. In a user control, I don't think I get any chance to do this. (The debugger says I don't see OnInit before the contained TextBoxExtender does, and there's no PreInit for the control).
So my only choice would be to derive from TextBoxWatermarkExtender. Not the end of the world, but I don't think it's what was intended. Thoughts?
Yeah, it's an awfully heavy price to pay for simply setting a property. I would much prefer to see this in the core classes.
No comments:
Post a Comment