Click to See Complete Forum and Search --> : Quote me unhappy


David Harrison
09-05-2003, 06:04 PM
OK, I have made a style sheet changer for my web-site with ASP, and this means that it has to write the link to a style sheet. So far no problems, I have this:

<%= "<link rel='stylesheet' type='text/css' href='../ss/a_style.css' title='A Title' />" %>

You may have noticed the / at the end, I'm using XHTML 1.1, this means that all attribute values have to be double quoted and yet the above code writes the link with single quoted attribute values.
So a simple question, how do I write double quotes? If it were JavaScript I would put \" to escape the quote, so is there a special character like this for VBScript?

rdoekes
09-07-2003, 12:00 PM
just use the double quotes:
<%= "<link rel=""stylesheet"" type=""text/css"" href=""../ss/a_style.css"" title=""A Title"" />" %>

-Rogier Doekes

David Harrison
09-10-2003, 03:48 PM
Thanks, that's perfect.
I'm sorry for not replying sooner but I normally get an e-mail notification when someone replies to a post that I'm part of but I didn't this time.
I guess I'm not subscribed to the ASP forum, soon sort that out.

Thanks again. :)