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. QueryString Problems

QueryString Problems

Scheduled Pinned Locked Moved ASP.NET
helpjavascriptsharepointquestion
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.
  • G Offline
    G Offline
    gus_br
    wrote on last edited by
    #1

    Hi everybody... I have some problems related to a querystring issue. I`m calling an ASPX page, with some querystring parameters, from a JavaScript function, through the window.open method. The way this URL is configured and called in the javascript function is the following: EnviarMapaEmail.aspx?type=addPt&x=-46.644203856241546&y=-23.571182563934798&st=Av.%20Paulista&nb=10&city=S%C3O%20PAULO&uf=SP&POI= And in the ASPX page, the Request.QueryString comes this way: type=addPt&x=-46.644203856241546&y=-23.571182563934798&st=Av.+Paulista&nb=10&city=SO+PAULO&uf=SP&POI= The problem is: the original city name (city parameter) is 'SÃO PAULO' and it`s encoded in the URL (thought the escape() javascript function) as 'S%C3O%20PAULO', but my ASPX page only recognize'SO+PAULO' and it goes back through the Request.QueryString as 'SO PAULO'. What`s the problem in encoding especial chars? Any hint would be very appreciated... :] See you!

    G 1 Reply Last reply
    0
    • G gus_br

      Hi everybody... I have some problems related to a querystring issue. I`m calling an ASPX page, with some querystring parameters, from a JavaScript function, through the window.open method. The way this URL is configured and called in the javascript function is the following: EnviarMapaEmail.aspx?type=addPt&x=-46.644203856241546&y=-23.571182563934798&st=Av.%20Paulista&nb=10&city=S%C3O%20PAULO&uf=SP&POI= And in the ASPX page, the Request.QueryString comes this way: type=addPt&x=-46.644203856241546&y=-23.571182563934798&st=Av.+Paulista&nb=10&city=SO+PAULO&uf=SP&POI= The problem is: the original city name (city parameter) is 'SÃO PAULO' and it`s encoded in the URL (thought the escape() javascript function) as 'S%C3O%20PAULO', but my ASPX page only recognize'SO+PAULO' and it goes back through the Request.QueryString as 'SO PAULO'. What`s the problem in encoding especial chars? Any hint would be very appreciated... :] See you!

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      AFAIK, the settings that decide how the escaped codes in the request are decoded are: :: The content-type setting in the html header, which probably comes from: :: The content-type meta tag in the sending page. :: The RequestEncoding setting in the web.config file. Also, the escape function might not take into account the selected encoding for the page. Try the newer encodeURIComponent function instead.

      --- single minded; short sighted; long gone;

      G 1 Reply Last reply
      0
      • G Guffa

        AFAIK, the settings that decide how the escaped codes in the request are decoded are: :: The content-type setting in the html header, which probably comes from: :: The content-type meta tag in the sending page. :: The RequestEncoding setting in the web.config file. Also, the escape function might not take into account the selected encoding for the page. Try the newer encodeURIComponent function instead.

        --- single minded; short sighted; long gone;

        G Offline
        G Offline
        gus_br
        wrote on last edited by
        #3

        hey guffa... thank you, it worked. both pages are .aspx, so, presumably, they`re using the same encoding type. but your hint about the encodeURIComponent function worked fine, both on IE and FF. cya

        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