Asp space between characters in querystring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fran7
    New Member
    • Jul 2006
    • 229

    Asp space between characters in querystring

    Hi, I wonder if anyone could give a clue about how one deals with space between characters in querystrings.

    For example i have links like

    page.asp?countr y=<%=rs("countr y")%>

    This often results in
    page.asp?countr y=american art

    with the result with a space between the query. I would like to swap the spaces for "-".

    Is it something like this that one has to use?

    Replace(country , " ", "-", 1, -1, 1)

    If so how would one write that in? with response write?


    <%
    response.write

    %>

    Thanks for any pointers
    Richard
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Yes, you would use the replace function.
    Code:
    page.asp?country=<%=Replace(rs("country"), " ", "-")%>

    Comment

    Working...