Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Escaping characters i nfriendly URL?

Escaping characters i nfriendly URL?

Scheduled Pinned Locked Moved ASP.NET
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    matsnas
    wrote on last edited by
    #1

    Hi! Let's say I'm building a personal music toplist and want to be able to use freiendly urls to map from http://mysite/artist.aspx?id=12 to http://mysite/artist/madonna. This works fine using an HttpHandler and catchin the web request. However what about bands like AC/DC or Simon&Garfunkel? How can I escape the characters "/" and "&" etc.??

    V 1 Reply Last reply
    0
    • M matsnas

      Hi! Let's say I'm building a personal music toplist and want to be able to use freiendly urls to map from http://mysite/artist.aspx?id=12 to http://mysite/artist/madonna. This works fine using an HttpHandler and catchin the web request. However what about bands like AC/DC or Simon&Garfunkel? How can I escape the characters "/" and "&" etc.??

      V Offline
      V Offline
      varshavmane
      wrote on last edited by
      #2

      Read this: http://www.webdeveloper.com/forum/archive/index.php/t-21641.html

      M 1 Reply Last reply
      0
      • V varshavmane

        Read this: http://www.webdeveloper.com/forum/archive/index.php/t-21641.html

        M Offline
        M Offline
        matsnas
        wrote on last edited by
        #3

        ...how this article relates to my problem? I have written an HttpHandler but when executing the following URl's I don't get the expected result: <a href=\"/artist/AC/DC\">AC/DC</a> //Handled "/" character as expected <a href=\"/artist/AC%2fDC\">AC%2fDC (/ )</a> //Expected to get the path "artist" and "AC/DC" <a href=\"/artist/AC%20DC\">AC%20DC ( )</a> //Works <a href=\"/artist/AC%26DC\">AC%26DC (& )</a> //Works <a href=\"/artist/AC%3aDC\">AC%3aDC (: )</a> //"Bad request", expected "artist" and "AC:DC" <a href=\"/artist/AC%2aDC\">AC%2aDC (* )</a> //"Bad request", expected "artist" and "AC&DC"

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups