Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Asp Help

  • 19-09-2004 05:43PM
    #1
    Registered Users, Registered Users 2 Posts: 2,643 ✭✭✭


    I can't understand this at all.
    The following code won't work for me:
    <h3 class="otherlinks2"><span><a href="sub_com.asp?groupName=<%=Server.URLEncode(rs_groups.Fields.Item("groupName").Value)%>&groupId=<%=(rs_groups.Fields.Item("groupId").Value)%>" title="Click to View Group"><%=(rs_groups.Fields.Item("groupName").Value)%></a></span></h3>
    

    What I am obviously trying to do is to return a value for groupName, as a link, passing groupName and groupId in the url from that link. However, it renders as the link blank for some reason which I can't establish.

    Here's the relevant excerpt from the rendered page:
    <h3 class="otherlinks2"><span><a href="sub_com.asp?groupName=Charter%2FConvention&groupId=2" title="Click to View Group"></a></span></h3>
    

    groupName will render into the href tag, but won't render as text.

    As a test I replaced the groupName with groupId, and it worked fine.

    Any help appreciated, I've been looking at this for about an hour.


Comments

  • Registered Users, Registered Users 2 Posts: 604 ✭✭✭Kai


    That is a weird one alright, they both look exactly the same so it should work.

    If it was me id try putting it in a variable instead :
    dim vargroupName
    
    vargroupName = (rs_groups.Fields.Item("groupName").Value)
    
    <h3 class="otherlinks2"><span><a href="sub_com.asp?groupName=<%=Server.URLEncode(vargroupName)%>&groupId=<%=(rs_groups.Fields.Item("groupId").Value)%>" title="Click to View Group"><%=vargroupName%></a></span></h3>
    
    


  • Registered Users, Registered Users 2 Posts: 2,643 ✭✭✭impr0v


    Your work-around does the business, thanks a lot.

    Still, If anyone has a theory as to why the original wouldn't work, I'd like to know.


Advertisement