-
Hi.. how could i link an ASP script to its own domin
for example:
newyork to www.newyork.com
miami to www.miami.com
...
I tried this:
<a href="http://www." & <%=rsInfo("city")%> & ".com"><%=rsInfo("city")%></a>
...but it shows me "http://www."
how can I string these????????
betto:)
PD: thanks Sonia ;)
-
Try This
I am new to ASP too. I THINK this might work but am not sure.
Code:
<%
Dim CityLink
CityLink = "http://www." & rsInfo("city") & ".com"
%>
<a href="<%CityLink%>"><%=rsInfo("city")%></a>
-
Great Drew!!!!!!!!!
...but just a little thing.. in
<a href="<%CityLink%>"><%=rsInfo("city")%></a>
it must be:
<a href="<=%CityLink%>"><%=rsInfo("city")%></a>
you forgot "=" :)
THANKS!!!!!!!!!!!!!!!!!
betto
-
...well or
<%=CityLink%>
whatever :)
betto
-
Yep, forgot the equal mark. Hope that worked for you!
-
Just do this:
<a href="http://www<%=rsInfo("city")%> .com"><%=rsInfo("city")%></a>
you don't need the double quotes since you technically aren't building a string variable.
If you were using response.write to print the html, then you would need the double quotes(without <%=):
response.write "<a href=""http://www." & rsInfo("city") & ".com"">" & rsInfo("city") & "</a>"