locked
why request parameters removed the plus sign (+) RRS feed

  • Question

  • User1704719655 posted

    i have the encrypted string  to passed on the request.parameter like x+vlgrt56. but when i get the value of the parameter on the next page it remove the plus sign??

    ex: http://test.com?Sample=x+vlgrt56

    but when i get the value of the parameter the plus sign is removed???

     how can i fix this? can anyone help?? thanks

    Tuesday, April 29, 2008 10:01 AM

Answers

  • User541108374 posted

    Hi,

    you can use Server.UrlEncode on the first page and when retrieving it, use Server.UrlDecode.

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 29, 2008 10:08 AM
  • User-1411408599 posted

    What he said :)

    Reason why is this: if you have a querystring like somepage.aspx?question=what+is+your+age, when you request.querystring["question"] in somepage.aspx.cs, you get the string "what is your age".

    Or: the + is sort of a reserved character for querystrings.  Solve it with the url encode/decode thingy.
     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 29, 2008 10:26 AM

All replies

  • User541108374 posted

    Hi,

    you can use Server.UrlEncode on the first page and when retrieving it, use Server.UrlDecode.

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 29, 2008 10:08 AM
  • User-1411408599 posted

    What he said :)

    Reason why is this: if you have a querystring like somepage.aspx?question=what+is+your+age, when you request.querystring["question"] in somepage.aspx.cs, you get the string "what is your age".

    Or: the + is sort of a reserved character for querystrings.  Solve it with the url encode/decode thingy.
     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 29, 2008 10:26 AM
  • User1704719655 posted

    Thanks.. [:)]

    Tuesday, May 13, 2008 7:05 AM