Wrox Programmer Forums
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 27th, 2007, 08:45 AM
Registered User
Join Date: Mar 2007
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.



Similar Threads
Thread Thread Starter Forum Replies Last Post
calling an UPDATE command from a textbox TomTab ADO.NET 3 January 19th, 2006 12:31 AM
Aligning Text of a textbox mahulda General .NET 0 July 27th, 2004 12:16 AM
Update textbox when List menu is Selected rylemer Javascript 3 November 11th, 2003 10:53 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.