Reputation: 25
I'm having trouble wiht an ASP Classic code that is very simple and its working in other pages.
I'm passing a value from a table into a link and showing that value in the name of the link
If i put it like this:
<a href="http://<%=rs("something")%>"><%=rs("something")%></a>
This should get the value into the name of the link and the same value into the link it self. But it doesn't. If I remove the tag it will show me the ("something") but without anchoring anywhere. If I put the tag like i have in the sample above, it will show nothing, just an empty space.
Upvotes: 0
Views: 143
Reputation: 25
thank you for your help. Problem solved. The table on SQL had the column IP defined has Varchar(MAX) that was the problem. I think in this case the Varchar have the samne behave has Nvarchar it shows all the 255 chars including the empty ones. That's why on the page the field was empty. It was only showing a small amout of the 255 chars.
Upvotes: 0
Reputation: 2442
can you put the value into a variable first, and then use that variable for the anchoring ?
ie.something like :
Dim ip
ip = rs("something")
and later on,
<a href="http://<%=ip%>"><%=ip%></a>
Upvotes: 1