how to add a table in a panel control at runtime

I am generating multiple tables at runtime and want to add it in a panel control. The html of the table I get is like this
<table runat="server" id="subtable 331" class="gridview_table">
        <tr class="gridview_altrow">
            <th rowspan="" colspan="">
                LA Areas</th>
            <th id="subtable_yearcode_0" laid="PGS" class="yearcode" term="subtable">
                PGS</th>
            <th>
                &nbsp</th>
            <th rowspan="" colspan="">
                Request Totals</th>
        </tr>
        <tr>
            <th id="subtable_area_0" laid="33-1" class="area" term="subtable">
                Banff & Buchan</th>
            <td>
                <input type="text" value="0" id="subtable_PGS_0" maxlength="5" onblur="checkvalue(this.id); dosum(this.id, new Array('subjectrequesttotals','fPGS_0'));" /></td>
            <th>
                &nbsp</th>
            <td>
                <input type="text" value="0" id="subtable_subjectrequesttotals_0" maxlength="5" thefuntion="sum(row)"
                    readonly="true" class="noenter" /></td>
        </tr>
</table>
how can I  add and display it in the panel.
Thanks

mmalik15Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

badalpatelCommented:
you can take reference of my below sample code
Panel pnlMain = new Panel();

        Table tbl = new Table();
        tbl.ID = "";
        TableHeaderRow thr = new TableHeaderRow();
        TableHeaderCell thc = new TableHeaderCell();
        thc.Text = "LA Areas";
        thr.Controls.Add(thc);
        thc = new TableHeaderCell();
        thc.Text = "PGS";
        thc.ColumnSpan=2;
        thr.Controls.Add(thc);
        tbl.Controls.Add(thr);
        TableRow tr =  new TableRow();
        TableCell td = new TableCell();
        td.Text = "td 1";
        tr.Controls.Add(td);
        td = new TableCell();
        td.Text = "td 2";
        td.ColumnSpan=2;
        tr.Controls.Add(td);
        tbl.Controls.Add(tr);

        pnlMain.Controls.Add(tbl)

Open in new window

0
mmalik15Author Commented:
Thanks for the reply.
I know how can I add a standard .net table in panel but i want to add a html tables created at runtimes.
Any other ideas?
0
aymoon80Commented:
you can use IE control and create your html dynamically in tmp file then load it into IE control
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

aymoon80Commented:
Sorry I thought it is a windows applications
0
aymoon80Commented:
you can put a variable in your html script then use Response.Write(yourVariable)

yourVariable is a string variable that holds your dynamically generated source code.

0
aymoon80Commented:
I notice that you add controls that run at server... this is not suitable in my approach

but please let me understand what is the case you have that guide you to do that?

Regards,
Ayman
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CodeCruiserCommented:
>panel control

Is that ASP.NET Panel?
0
mmalik15Author Commented:
..
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.