Solved

create table/rows from code behind

Posted on 2006-11-04
3
1,424 Views
Last Modified: 2012-06-21
how do i generate table/rows from code behind, a examle will be better.

ps: sorry i have only 15 points and i wish i could increase more.

here is my table looks like in html:

//
<table>
            <tr>
                <td style="width: 100px">
                     </td>
                <td style="width: 100px">
                     </td>
                <td style="width: 100px">
                </td>
            </tr>
            <tr>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
            </tr>
            <tr>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
            </tr>
            <tr>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
            </tr>
            <tr>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
            </tr>
            <tr>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
            </tr>
            <tr>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
                <td style="width: 100px">
                </td>
            </tr>
        </table>
0
Comment
Question by:Islam1424
3 Comments
 
LVL 2

Assisted Solution

by:beasha
beasha earned 25 total points
ID: 17876329
i would insert a cell on my form designer, run it as a server control.

code behinde:

mycell.innerHtml = "<table><tr><td style="width: 100px"></td><td style="width: 100px"></td><td style="width:100px"></td></tr><tr><td style="width: 100px"></td><td style="width: 100px"></td><td style="width: 100px"></td></tr><tr><td style="width: 100px"></td><td style="width:100px"></td><tdstyle="width: 100px"></td></tr><tr><td style="width: 100px"></td><td style="width: 100px"></td><td style="width: 100px"></td></tr><tr>............</table>"


hope this is what you want

bashar
0
 

Author Comment

by:Islam1424
ID: 17877007
no dear thats NOT the correct way of doing

thanks for response.
0
 
LVL 11

Accepted Solution

by:
ethoths earned 25 total points
ID: 17880031
you do it by creating the table, row and cell (with new) and adding them to the forms controlc collection...

Dim cell as new TableCell
Dim row as new TableRow
row.controls.add(cell)
Dim table as New table
table.controls.add(row)
me.controls.add(table)


Yo should get the idea.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

832 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