Rafee
Rafee

Reputation: 1

How to return a link for given text using asp code

I am trying to return a link for the given text. Here is the code:

<%
dim t

t = Request.QueryString("txt")
Response.Write("<a href = \" page2.html \" >" & t & "<\a>")
%>

Can anybody tell me what's wrong with the code?, it is not working.

Upvotes: 0

Views: 64

Answers (1)

Flakes
Flakes

Reputation: 2442

To escape the " in vbscript, you have to double it. That is use "" for printing ".

Response.Write("<a href = "" page2.html "" >" & t & "<\a>")

Upvotes: 1

Related Questions