Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Asp Help

Options
  • 19-09-2004 5:43pm
    #1
    Registered Users Posts: 2,647 ✭✭✭


    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 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 Posts: 2,647 ✭✭✭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