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. url encode with '+'

url encode with '+'

Scheduled Pinned Locked Moved ASP.NET
databasesysadmintutorialquestionannouncement
4 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
    g00fyman
    wrote on last edited by
    #1

    hi all, i have a httphandler that returns an image when i send it text (and other parameters). The trouble is i have a need to send the string 'news + events', but the '+' is not being output at all. code in page _HeadingTextImage.ImageUrl = "textimage.ashx?text=" + Server.UrlEncode("news+events"); code in httphandler string qText = (query["text"] == null) ? UsageText : context.Server.UrlDecode(query["text"]); qText always = "news events" when i step into it. can anyone tell me how to do this please? thanks, Maurice

    S 1 Reply Last reply
    0
    • G g00fyman

      hi all, i have a httphandler that returns an image when i send it text (and other parameters). The trouble is i have a need to send the string 'news + events', but the '+' is not being output at all. code in page _HeadingTextImage.ImageUrl = "textimage.ashx?text=" + Server.UrlEncode("news+events"); code in httphandler string qText = (query["text"] == null) ? UsageText : context.Server.UrlDecode(query["text"]); qText always = "news events" when i step into it. can anyone tell me how to do this please? thanks, Maurice

      S Offline
      S Offline
      Sandeep Kumar
      wrote on last edited by
      #2

      Hi you find info in below link.... http://www.albionresearch.com/misc/urlencode.php

      Regards, Sandeep Kumar.V

      G 1 Reply Last reply
      0
      • S Sandeep Kumar

        Hi you find info in below link.... http://www.albionresearch.com/misc/urlencode.php

        Regards, Sandeep Kumar.V

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

        hello, thanks for the reply. that page encodes news+events as news%2Bevents which is what i get as input to the handler in the raw url (Request.QueryString) but when i do Request.QueryString["qText"]; it return "news events", replacing the %2B with a space. thanks, Maurice

        G 1 Reply Last reply
        0
        • G g00fyman

          hello, thanks for the reply. that page encodes news+events as news%2Bevents which is what i get as input to the handler in the raw url (Request.QueryString) but when i do Request.QueryString["qText"]; it return "news events", replacing the %2B with a space. thanks, Maurice

          G Offline
          G Offline
          g00fyman
          wrote on last edited by
          #4

          thank you i have resolved the issue. if i urldecode the query in the handler it doesnt work, but if i urlencode the url in the page then just process it in the handler without urldecode'ing it, then it works fine. regards, maurice.

          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