473,378 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Dynamically HOW TO ADD TEXT BOXS in ASP.NET Using VB Coding??

Dear friends,

I have to create a webpage where in it ask the user to enter a number.

when the user enters a number and clicks Submit button, then page should display that number of text boxes.

for example if user enters number 5 then the page should display 5 text boxes in different line next to other.

Waiting for your replys..
Thanks,
Kapil.
Apr 27 '07 #1
1 963
dip_developer
648 Expert 512MB
Dear friends,

I have to create a webpage where in it ask the user to enter a number.

when the user enters a number and clicks Submit button, then page should display that number of text boxes.

for example if user enters number 5 then the page should display 5 text boxes in different line next to other.

Waiting for your replys..
Thanks,
Kapil.

Take a PlaceHolder control...Add textbox at runtime with the following code(Code is in VB.net). You have to set the width/height of dynamically created textbox on your own

Expand|Select|Wrap|Line Numbers
  1. Dim tb as TextBox
  2. Dim n As Integer = Val(myTextbox.Text)
  3.  
  4.  For i As Integer = 0 To n - 1
  5.             tb = New TextBox
  6.            PlaceHolder1.Controls.Add(tb)
  7.         Next
Apr 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dave Nouwens | last post by:
Hi All, Please accept my appologies in advance for what I expect will be a reasonably simple question. I have an html form (which is generated in php) which contains a number of rows (one row...
0
by: Mike | last post by:
Hi, I am having problems with my program, the problem is it will not put the datagrid into edit mode. The .aspx page has the following code in it : - <asp:datagrid id="DataGrid2"...
11
by: GaryB | last post by:
Hi Guys, I've been battling with this one for hours - I hope that you can help me! My code modifies the <aon a page, from a standard document link into a link with a tailored onclick event. ...
1
Gyro
by: Gyro | last post by:
Hi all, I'm a php newbie and have read various posts/articles on populating select lists dynamically from a db table. However, I cant seem to get it working in the way I want... I have 3 select...
1
by: hello2008 | last post by:
Hi, I have just started coding in PHP. I have coded a web page using HTML, JS, and PHP. An HTML table has to be populated dynamically using the data from the backend. Presently I have 5...
7
by: moksha | last post by:
Hi, I am new to javascript and i am facing a problem in coding. plz help me out. I am using javascript for dynamically creating a table row which contains text boxes and radio...
4
by: Craig Buchanan | last post by:
I dynamically add data-bound templates to a gridview in my ascx control. while this works correctly when the gridview is databound to the datatable, i'm having issues on postback. i would like...
17
by: shivasusan | last post by:
Hi! In my program, I have multiple check boxs.(more the 10) But i give rights to select 2 check boxs, If i select more then 2 check boxs, I want to display alert message. Please any one post...
2
by: gubbachchi | last post by:
Hi, I have a form whose elements are created dynamically on selection, i.e. the form has only text boxes and the number of text boxes depends on the users selection, if user selects 3 then 3...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.