Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

C#/ASP.NET Table control

  • 13-04-2008 03:18AM
    #1
    Registered Users, Registered Users 2 Posts: 1,391 ✭✭✭


    Probably something real simple but how can I add an empty row to a table in ASP.NET?


Comments

  • Registered Users, Registered Users 2 Posts: 1,391 ✭✭✭fatherdougalmag


    Never mind. Cell.Text = " " does the trick.


  • Registered Users, Registered Users 2 Posts: 6,762 ✭✭✭WizZard


    Never mind. Cell.Text = " " does the trick.

    That's a bit of a hack, is there no better way?? What version of ASP.NET are you using?


  • Moderators, Science, Health & Environment Moderators Posts: 9,220 Mod ✭✭✭✭mewso


    Hack or not it's the best way to do it since any table with nothing in the cell will not be visible, in IE at least.


  • Moderators, Society & Culture Moderators Posts: 9,688 Mod ✭✭✭✭stevenmu


    Yep, it's not an ASP related problem, that will create the empy row no problem, the problem is that some browsers won't render it correctly.

    The other thing people do, apart from &nbsp, is to create a 1 pixel transparent gif and put that in the cell (IIRC firefox/mozilla will sometimes render the actual characters &nbsp instead of a blank space).


Advertisement