Search This Blog

Pages

Sunday, February 13, 2011

insert double quotes in asp

In PHP and other languages we can use two type of quotes (single and double) but in ASP we cant use single quote because it is treated as a comment.
If you want to display some text within quotes you have to use two double quotes as follows.

<% Dim str
str="This is a ""example"" text"
Response.Write(str)
%>

Output
This is a "example" text

No comments:

Post a Comment