I've got a WebControl that I want to dynamically add a HiddenField from.
I've tried the following example: Click here, but that doesn't work due to the fact this.Page.Form is null in the Page Init event.
I've tried the following, but the value is never maintained:
HiddenField hd_IsDirty = new HiddenField();
protected override void OnInit(EventArgs e)
{
this.Controls.Add(hd_IsDirty);
hd_IsDirty.ID = "hd_IsDirty";
base.OnInit(e);
}