Build script dynamically...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ivan Demkovitch

    #1

    Build script dynamically...

    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.Ad d(new LiteralControl( "<script
    type=\"text/javascript\">Tr ustLogo(\"https ://" +
    ConfigurationSe ttings.AppSetti ngs["DomainName "] +
    "/images/secure_site.gif \", \"SC\", \"none\");</script>"));
    tR.Cells.Add(tC 1);


    This doesn't work, gives me error:
    CS1010: Newline in constant

    How do I do it?


Working...