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

M

Mick

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>
 
M

Murray

Try this -

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

%>
</body>
</html>
 
T

Thomas A. Rowe

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.
==============================================
 
Top