Solved

ASP.NET thead create table with thead using code behind

Posted on 2013-02-01
2
1,873 Views
Last Modified: 2013-02-04
using my existing code below how can i incorp thead

<table><thead><tr><td></td></tr></table>

 
Dim c As New TableCell
            Dim r As New TableRow
            Dim D As New TableRow

 c = New TableCell
                c.Text = "te"
                r.Style.Add("text-align", "center")
                c.Style.Add("width", "70px")
                c.Style.Add("border-bottom", "black 1px solid")
                r.Cells.Add(c)

                c = New TableCell
                c.Text = "Item"
                r.Style.Add("text-align", "center")
                c.Style.Add("width", "40px")
                c.Style.Add("border-bottom", "black 1px solid")
                'c.ColumnSpan = 3
                r.Cells.Add(c)
 Trade.Rows.Add(r)

Open in new window

0
Comment
Question by:sevensnake77
2 Comments
 
LVL 6

Accepted Solution

by:
esolve earned 500 total points
ID: 38846296
Look at this:

http://www.thebestdata.com/zoom.htm?menutype=1&auto=2362
http://forums.asp.net/t/1182775.aspx/1
TableRow row = new TableHeaderRow();
        TableRow row2 = new TableRow();
        TableRow row3 = new TableFooterRow();
        Table table = new Table();

        var cell1 = new TableCell();
        row.TableSection = TableRowSection.TableHeader;
        cell1.Text = "Header";
        row.Cells.Add(cell1);

        var cell2 = new TableCell();
        cell2.Text = "Contents";
        row2.Cells.Add(cell2);

        var cell3 = new TableCell();
        cell3.Text = "Footer";
        row3.Cells.Add(cell3);
        row3.TableSection = TableRowSection.TableFooter;


        table.Rows.Add(row);
        table.Rows.Add(row2);
        table.Rows.Add(row3);
        this.Controls.Add(table);

Open in new window

0
 
LVL 9

Author Closing Comment

by:sevensnake77
ID: 38851577
tks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A short film showing how OnPage and Connectwise integration works.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

919 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now