sholder Posted June 23, 2003 Posted June 23, 2003 I have a question.... I'm building a ASPX/VB form that builds dynamic controls based on user input and I can't get it to work to save my life... Basically, the user is given a form to describe an object (actually a storage container in a factory, but neither here nor there.) Anyway, the user puts in the basic info but the last line asks "How many containers?" This allows the user to put in a specified number that will then create dynamic text boxes that allows the user to input uniquie names for the number of containers specified and then inputs the results into a SQL table... For example.... Name: container 1 Property: Property1 Color: Red Size: Big Contents: Waste Product I'm I assuming you use controls.add but how do you make it dynamic? where you are creating X number of textboxes? Any help would be greatly appreciated.:confused: Quote
Moderators Robby Posted June 23, 2003 Moderators Posted June 23, 2003 try this.. For x = 1 To 20 txt = New textbox() With txt AddHandler .GotFocus, AddressOf txtClick .Text = "Textbox " & x.tostring .Location = New Point(0, x * 25) .Size = New Size(200, 60) End With Controls.Add(txt) Next Quote Visit...Bassic Software
*Experts* mutant Posted June 23, 2003 *Experts* Posted June 23, 2003 TextBox webcontrol doesnt have .GotFocus event or Location property :). Quote
Moderators Robby Posted June 23, 2003 Moderators Posted June 23, 2003 Oooo! I should read the post next time, didn't realize it was ASP... Thanks Mutant. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.