Table

A

anonymous

I am dynamicly generating a table.When the table is
generated it always put a new table in a left top corner.
How do I put in a middle of the form?
 
R

Ray Simpson

You could wrap it inside of a div tag with its alignment
set to center. You could either place a div on your
form, or you could generate it dynamically.

Regards,

Ray Simpson
 
R

Ray Simpson

Sure,

HtmlGenericControl divexample = new HtmlGenericControl
("DIV");

// This will add the center attribute
divexample.Attributes.Add("Align", "Center");
// Generate your table control and then add it to the div
divexample.Controls.Add(MyTable);

Ray
 
A

anonymous

Thank you for the example, but I am using a vb.
I try to translate to vb, but still not luck.
Dim HtmlGenericControl As divexample = New
HtmlGenericControl("DIV")
divexample.Attributes.Add("Align", "Center")
divexample.Controls.Add(MyTable)
 

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,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top