|
-
Mar 30th, 2001, 01:12 PM
#1
Thread Starter
Member
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
-
Mar 30th, 2001, 01:17 PM
#2
Hyperactive Member
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>
-
Mar 30th, 2001, 01:57 PM
#3
Thread Starter
Member
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
-
Mar 30th, 2001, 02:02 PM
#4
Thread Starter
Member
...well or
<%=CityLink%>
whatever 
betto
-
Mar 30th, 2001, 02:20 PM
#5
Hyperactive Member
Yep, forgot the equal mark. Hope that worked for you!
-
Mar 30th, 2001, 04:49 PM
#6
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>"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|