Note: Going to be posting a few silly questions (seems to be silly problems) so be warned, my webforms knowledge are pretty low.
I got a hidden control in a User Control, as follows:
The user control have a member:Code:<asp:HiddenField ID="workDateId" runat="server" Value="" />
In the form load event for the user control I set the value of my hidden control to the value of my member:Code:public string WorkDateId { get; set; }
I use the user control as follows:Code:workDateId.Value = WorkDateId;
However, the value of the hidden control are never set.Code:var ctrl = (TestControl)LoadControl("TestControl.ascx"); ctrl.WorkDateId = "some nonsense"; var cell = new TableCell(); cell.Controls.Add(ctrl); tblRow.Cells.Add(cell);
So..what did I miss?![]()




Reply With Quote