Cannot update textbox.text
I am trying to update a textbox which is on default.aspx from code within a class. The code is as follows:
Dim m_control As Control
Dim NewTextbox As TextBox
NewTextbox = m_Page.FindControl("txtID")
NewTextbox.Text = sValID
When I debug this, it seems to work but the textbox shown on the page is not updated and I am unable to see the value from another page using the following:
sString = CType(PreviousPage.FindControl("txtID"), TextBox).Text
Can someone please tell me what I'm doing wrong.
Thanks,
John
|