#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    12
    Rep Power
    0

    InnerText +   ?


    Hi all,
    Want to put a   into a tablecell (to display border):

    tbc = new HTMLTableCell()
    tbc.InnerHTML = "id='myid' onclick='somecode( this.id );"
    tbc.InnerText = " "

    But html code displays " " instead of a blank ???
    Howto ?

    TIA, acki4711
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0
    Below code snippet will solve your problem

    for (int i = 0; i < 10; i++)
    {
    HtmlTableRow tr = new HtmlTableRow();
    HtmlTableCell td = new HtmlTableCell();

    td.InnerText = " ";
    tr.Cells.Add(td);

    tblRelated.Rows.Add(tr);
    }
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    10
    Rep Power
    0
    &nbsp; should not be in double quotes. if you want to print double quotes then prefix it with backslash \"&nbsp;\"

IMN logo majestic logo threadwatch logo seochat tools logo