Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / May 2006

Tip: Looking for answers? Try searching our database.

How to create TextBox controls in runtime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hebert - 29 May 2006 16:38 GMT
Hi... I need to know how to create TexBox controls in runtime and also know
how to named each one
For Example>

If I create 5 TextBox controls in runtime... Each of these must be named as:
txt_01_02_I
txt_02_04_I
txt_03_06_I
txt_04_07_I
txt_05_09_I

For me those numbers mean code that then will serve me  in order to save the
information that the textbox controls contain

Thanks a lot for their help
Kevin Spencer - 30 May 2006 13:08 GMT
Here's a little trick you can use: In Visual Studio's Windows Forms
designer, add a TextBox to a form visually, by adding it from the toolbox.
Allow it to be named "TextBox1" or just take a note of the name. Then open
the Designer code for the form, which is usally called something like
"Form1Designer.cs" and expand all outlining. Do a Find in the code for all
references to "TextBox1" and copy the code to NotePad. That will be all the
code needed to properly add a TextBox to your form. Modify it for each
TextBox you want to add at runtime. And there you go.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Abnormality is anything but average.

> Hi... I need to know how to create TexBox controls in runtime and also
> know how to named each one
[quoted text clipped - 12 lines]
>
> Thanks a lot for their help

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.