Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Dynamic HTML Table C#

Dynamic HTML Table C#

Scheduled Pinned Locked Moved C#
csharphtmldatabasesql-serversysadmin
3 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SharonRao
    wrote on last edited by
    #1

    Hello All, I was trying to create dynamic HTML table using C#. The data for the table comes from sql server filled datatable (i have succeded in this aspect), I am not able to figure out how to create HTML table with this data. Any suggestions are welcome.:)

    Thanks in Advance for your help. Best Regards

    G 1 Reply Last reply
    0
    • S SharonRao

      Hello All, I was trying to create dynamic HTML table using C#. The data for the table comes from sql server filled datatable (i have succeded in this aspect), I am not able to figure out how to create HTML table with this data. Any suggestions are welcome.:)

      Thanks in Advance for your help. Best Regards

      G Offline
      G Offline
      gauthee
      wrote on last edited by
      #2

      you have htmltable, htmltablerow, htmltablecell first, set the cell data using htmaltablecell's innerhtml property next, add this cell to the row, finally add the row to the table using its property rows.add(tablerow)

      Gautham

      S 1 Reply Last reply
      0
      • G gauthee

        you have htmltable, htmltablerow, htmltablecell first, set the cell data using htmaltablecell's innerhtml property next, add this cell to the row, finally add the row to the table using its property rows.add(tablerow)

        Gautham

        S Offline
        S Offline
        SharonRao
        wrote on last edited by
        #3

        Thanks i have done this and it works fine could you please tell me how to display the data in three columns instead of one column.![](<%# Eval()" width="120" height="100" border="0">

        $<%# Eval("Price") %>

        <%# Eval("ProductName") %> cheers, shilpa.:)

        Thanks in Advance for your help. Best Regards

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups