Re: How to add   in runtime

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I suspect you're having trouble because you're using InnerText rather than
InnerHtml on your HtmlTableCell. The value of InnerText is HTML encoded so
it makes sense that the "&" in " " would be converted to "&".

HTH
----------------
Dave Fancher
http://www.davefancher.com

"Jouni Karppinen" <JouniKarppinen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:9BD46208-5682-49B1-9D54-CBB0BBA77BA5@xxxxxxxxxxxxxxxx
> My first message didn't show up correctly.
>
> Output to HTML page was:
> <td class="viewCell">&amp;nbsp;</td>
> when using cell.InnerText = "&nbsp;";
>
>
>
> "Eliyahu Goldin" wrote:
>
>> Why aren't you happy with <td class="demo">&npsp;</td>?
>>
>> Eliyahu
>>
>> "Jouni Karppinen" <JouniKarppinen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
>> message news:4A8F3B82-0694-46B9-87FC-F45AE6A27891@xxxxxxxxxxxxxxxx
>> > I create a HTMLTable in my C# code and then add rows and cells into
>> > that
>> table.
>> >
>> > I'm trying to set top and bottom border for each cell by using
>> > stylesheet
>> > and it works as far as cell has some text in it.
>> > If cell has no content at all, the borders do not show up (..strange)
>> >
>> > So I tried to insert text inside each cell which has no other content
>> > inside.
>> >
>> > Cell content is set in code:
>> > cell.InnerText = " ";
>> >
>> > What I wanted to get parsed to HTML:
>> > <td class="demo"> </td>
>> >
>> > but instead I got:
>> > <td class="demo">&npsp;</td>
>> >
>> > Any solutions?
>> >
>>
>>
>>


.



Relevant Pages

  • Re: Images & Hyperlinks
    ... Text boxes use VML graphics which only render in Internet explorer running on Windows. ... That works well too, what is that anyway, a cell table ... large text box with a background color with additional ... Better to set the bottom border to 2px, ...
    (microsoft.public.frontpage.programming)
  • Re: border
    ... > WordRow is set like this ... In this case, if Cellsof the last row has a bottom border, when Word ... For example, if you select 3 rows and use wdBorderBottom, only the third row ... So, if you add a row, and you want what used to be the last cell of the row ...
    (microsoft.public.word.vba.general)
  • Re: Function to Check Borders
    ... bottom border as well as the one that do. ... "Dave Peterson" wrote: ... Marco wrote: ... My function will be in cell M15, checking cell A14 for the border. ...
    (microsoft.public.excel.programming)
  • Re: Conditional formatting equal values 2007
    ... The solution for your first #2 is to have F2 be the active cell when you apply the CF. ... The solution to loosing the bottom border is to use ... I want to do 3 lots of conditional formatting. ... bottom border formatting from condition 1 ...
    (microsoft.public.excel.misc)
  • Re: Copy above fails one way, copy below fails another way
    ... I seht him a file which includes a graph using defined ranges. ... Cell C12 contains =AVERAGE ... Call this method the Copy-Insert-Down method. ... After selecting Row 14 as above, I Ctrl-Shift-Drag the bottom border ...
    (microsoft.public.excel)