Well I know that sometimes when I try to build a string and seperate the
lines (pressing enter key mid string), the enter key places a \n (newline)
character in the string. I just looked at my last reply and I do see it
serperated.... It supposed to be a single line of code vs multi for building
the "literal" string. I agree with you, logically placing the '+' between
breaks should do the trick but it dont sometimes...
Also, I remember one time where I copied and pasted a string from a word
doc, placed the string all on one line... and still get the error. That was
because the \n charcter was still in the string... You just could not see
it.
For example:
I copied the leteral string from the last reply I sent...
"<script
type=\"text/javascript\">TrustLogo(\"https://" +
ConfigurationSettings.AppSettings["DomanName"] + "/images/secure_site.gif\",
\"SC\", \"none\");</script>"
Pasted it into my code and get the error "Newline in constant"... then I
cleaned it up and it was fine. Unfortunatly, there is no good way of
finding the "newline".
"Ivan Demkovitch" <i@a.b> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi!
Here is my problem: I'm inserting script for Trust Logo from one of the
SSL authorities.
It works fine when I do it in HTML, but I need to build it dynamically:
HtmlTableRow tR = new HtmlTableRow();
HtmlTableCell tC1 = new HtmlTableCell();
tC1.Controls.Add(new LiteralControl("<script
type=\"text/javascript\">TrustLogo(\"https://" +
ConfigurationSettings.AppSettings["DomainName"] +
"/images/secure_site.gif\", \"SC\", \"none\");</script>"));
tR.Cells.Add(tC1);
This doesn't work, gives me error:
CS1010: Newline in constant
How do I do it?