I have a text box, txtGroup, that I'm trying to insert with a ddl value.
When the page loads, I have a label, lblLoad, that will populate with the correct ddl value. When there is a PostBack, there's another label, lblPostBack, that populates with the PostBack value from the ddl. What I can't figure out is how to get the TextBox to reflect the value from the PostBack in the lblPostBack control.
I've placed my code in the Page_Prerender handler:
If (Not Page.IsPostBack) Then
txtGroup.Text = lblLoad.Text.ToString
Else
txtGroup.Text = lblPostBack.Text.ToString
End If
I can see the information I want in the labels, I just can't get the textbox to show it.
When the page loads, I have a label, lblLoad, that will populate with the correct ddl value. When there is a PostBack, there's another label, lblPostBack, that populates with the PostBack value from the ddl. What I can't figure out is how to get the TextBox to reflect the value from the PostBack in the lblPostBack control.
I've placed my code in the Page_Prerender handler:
If (Not Page.IsPostBack) Then
txtGroup.Text = lblLoad.Text.ToString
Else
txtGroup.Text = lblPostBack.Text.ToString
End If
I can see the information I want in the labels, I just can't get the textbox to show it.