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. query string problem

query string problem

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netdatabasesecurity
6 Posts 3 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.
  • V Offline
    V Offline
    vkumar09
    wrote on last edited by
    #1

    I'm using a query string in asp.net2.0 web application.I encrypt a string value and after encryption it becomes M8BIJqI+Sdc= and I send the value using query string.When I receive the value in another page using Request.Querystring method it comes as M8BIJqI Sdc=.The + symbol becomes a space .So I'm getting error during decryption. Anyone explain such behavior !!!!

    B J 2 Replies Last reply
    0
    • V vkumar09

      I'm using a query string in asp.net2.0 web application.I encrypt a string value and after encryption it becomes M8BIJqI+Sdc= and I send the value using query string.When I receive the value in another page using Request.Querystring method it comes as M8BIJqI Sdc=.The + symbol becomes a space .So I'm getting error during decryption. Anyone explain such behavior !!!!

      B Offline
      B Offline
      Brij
      wrote on last edited by
      #2

      There are some characters that cannot be passed over querystring.For that you need to do URL endcoding as, for encoding Server.UrlEncode and decoding as Server.UrlDecode. For details Have alook

      Cheers!! Brij Check my latest Article :Exploring ASP.NET Validators

      V 1 Reply Last reply
      0
      • V vkumar09

        I'm using a query string in asp.net2.0 web application.I encrypt a string value and after encryption it becomes M8BIJqI+Sdc= and I send the value using query string.When I receive the value in another page using Request.Querystring method it comes as M8BIJqI Sdc=.The + symbol becomes a space .So I'm getting error during decryption. Anyone explain such behavior !!!!

        J Offline
        J Offline
        Jamil Hallal
        wrote on last edited by
        #3

        Hi, Use Server.UrlEncode/ Server.UrlDecode to fix the issue,please check the following example:

        string MyURL;
        MyURL = "http://www.contoso.com/articles.aspx?title=" + Server.UrlEncode("ASP.NET Examples");

        Response.Write("<a href=" + MyURL + "> ASP.NET Examples </a>");

        string DecodedString = Server.UrlDecode(EncodedString);

        Regards, Jamil

        1 Reply Last reply
        0
        • B Brij

          There are some characters that cannot be passed over querystring.For that you need to do URL endcoding as, for encoding Server.UrlEncode and decoding as Server.UrlDecode. For details Have alook

          Cheers!! Brij Check my latest Article :Exploring ASP.NET Validators

          V Offline
          V Offline
          vkumar09
          wrote on last edited by
          #4

          thanx guys..

          B J 2 Replies Last reply
          0
          • V vkumar09

            thanx guys..

            B Offline
            B Offline
            Brij
            wrote on last edited by
            #5

            your welcome :)

            Cheers!! Brij Check my latest Article :Exploring ASP.NET Validators

            1 Reply Last reply
            0
            • V vkumar09

              thanx guys..

              J Offline
              J Offline
              Jamil Hallal
              wrote on last edited by
              #6

              you are welcome.

              Regards, Jamil Check my latest Article :Silverlight - Html Host Control

              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