E
Egbert Nierop \(MVP for IIS\)
Hi,
I have a complex asp.net 1.1 program that dynamically needs to load controls
(LoadControl)
The textboxes etc inside these controls keep viewstate and values but not
within
Page_Load()
when that event is 'going on' the load control happens but the values are
not yet 'filled in' They are filled in only -when- the pageload event has
been executed completely.
QUESTION: How to fix this behaviour?
So
Private MyControl myControl;
void PageLoad(object sender, EventArgs e)
{
this.myControl = (myControl) LoadControl("myControl.ascx");
myPlaceHolder.Controls.Add(myControl);
if (IsPostBack)
string temp = this.myControl.someProperty; // maps to internal
TextBox!
ïf (temp.Length == 0)
lblError.Text = "empty!";
}
}
I have a complex asp.net 1.1 program that dynamically needs to load controls
(LoadControl)
The textboxes etc inside these controls keep viewstate and values but not
within
Page_Load()
when that event is 'going on' the load control happens but the values are
not yet 'filled in' They are filled in only -when- the pageload event has
been executed completely.
QUESTION: How to fix this behaviour?
So
Private MyControl myControl;
void PageLoad(object sender, EventArgs e)
{
this.myControl = (myControl) LoadControl("myControl.ascx");
myPlaceHolder.Controls.Add(myControl);
if (IsPostBack)
string temp = this.myControl.someProperty; // maps to internal
TextBox!
ïf (temp.Length == 0)
lblError.Text = "empty!";
}
}