Adding controls to table

T

Tony

Win XP - VS 2002 - VB



I created a web forms table with 2 rows 2 cells each row.

I've created controls on design page 2 labels and 2 text boxes.

When adding the control to the table,

I used,

tblVendorDispute.Rows(0).Cells(0).Controls.Add(Label1)

tblVendorDispute.Rows(0).Cells(1).Controls.Add(textbox1)

They (controls) move their position but not inside the table, It almost
seems as if it has something to do with their original position on the
design page as to where they move.



Anything I'm doing wrong?



Thanks
 
S

Sean McKaharay

First you should probably add the controls dynamicly. If you didn't want to
you should look at the html written to the page. You have properties that
have the location of the control. When you drop the control on the page it
puts location tags on it. go to the html code on the page delete the
position stuff and it should work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top