View Single Post
  #1 (permalink)  
Old March 27th, 2007, 08:45 AM
John Leo John Leo is offline
Registered User
Join Date: Mar 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.


Reply With Quote