[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Is it possible to create textbox dynamically?

Posted on 2009-02-08
5
Medium Priority
?
241 Views
Last Modified: 2013-12-17
Hi,
i would like to create textbox based on how many items i have in my arraylist. is it possible? so like if i have 5 item there should only be 5 box or if i have 10 should only be 10. etc... is it possible?i tried creating box like this as a test:

        TextBox newbox = new TextBox();
        newbox.ID = "newbox";
        newbox.Text = "hi";
        newbox.TextMode = TextBoxMode.MultiLine;
        this.Controls.Add(newbox);

but it gives an error since i didnt add the label in my aspx file, but i dont know how many boxes i will have to add there. is what i am doing possible?

Thanks.
0
Comment
Question by:Raul77
  • 2
  • 2
5 Comments
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 23587143
yes you can definitely create dynamic text boxes
look at the following link from microsoft
http://support.microsoft.com/kb/317794
0
 

Author Comment

by:Raul77
ID: 23587180
thanks but the code is if you know how many box you will have, can you show me a simple example if you dont know how many text boxes you will have?
Thanks
0
 
LVL 30

Accepted Solution

by:
anarki_jimbel earned 500 total points
ID: 23587201
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 23587214
0
 

Author Closing Comment

by:Raul77
ID: 31544381
Thanks.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month18 days, 19 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question