<% strName="John Smith" %> Referring to the above, if you want to pass the contents of the strName variable in a hyperlink, which line of code would you use?

A. This cannot be done. The anchor is on the client and the variable is on the server.
B. href="Encode.asp?

Showing Answers 1 - 2 of 2 Answers

Dhara

  • Jul 9th, 2005
 

option (B): href = "Encode.asp?strname"

  Was this answer useful?  Yes

balu

  • Oct 25th, 2005
 

<%

encoded_str=Server.Urlencode(strName)

%>

href="Encode.asp?str=<%=encoded_str%>" target="_blank" rel="nofollow"

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions