HREF ASP code problem - what's wrong with this code....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to display text on a web page with a hyperlink in it. I get
nothing displayed when I try the following code. No error message is
displayed. If anyone knows what the problem is please let me know. Thanks for
any replies.

<html>
<body>
<%
text = "www.microsoft.com"
urlname = "microsoft"
response.write "<a href= & text & urlname >" & "</a>"

%>
</body>
</html>
 
Try this -

<%@LANGUAGE="VBSCRIPT"%>
<html>
<head>
</head>
<body>
<%
text = "http://www.microsoft.com"
urlname = "microsoft"
response.write ("<a href=" & "'" & text & "'" & ">" & urlname & "</a>")

%>
</body>
</html>
 
Or

<html>
<head>
</head>
<body>
<%
urllink= "http://www.microsoft.com"
urlname = "microsoft"
%>

<a href = "<%=urllink%>"><%=urlname%></a>

</body>
</html>


--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Back
Top