Im not sure but you might want something like:

TextBox a = this.Controls.Find("FirstName", true)[0] as TextBox;

grabbing element 0 is assuming you only have one and only one control named
FirstName on this form.
On 4/19/07, Phil Sayers <[EMAIL PROTECTED]> wrote:

would databinding help you here..

bind the .Text property of your textbox to the "FirstName" property on an
object
?


-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] Behalf Of Jon Rothlander
Sent: Thursday, April 19, 2007 1:08 PM
To: [email protected]
Subject: [ADVANCED-DOTNET] Creating a textbox from a string...


Hit send before I finished... I didn't mention that the closest I can come
to what I remember doing in the past is the following.  The only problem
here is that it just pulls in the string's name and not the value of the
string itself.  So this doesn't work.  There is a way to have it pull the
actual value of the string and not just its name.  I just cannot remember
how to do it.

Any help would be very much appreciated.

Best regards,
Jon Rothlander

                       'Sync
               Dim txtbx As New TextBox
               txtbx.Text = CType(sCtrl, Object)
               ctrl.Text = txtbx.Text

===================================
This list is hosted by DevelopMentor.  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com


===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to