Hi,
In my C# Net I have a string after encrypting as:
LVp0XG2enhBUFifY+41kQ
In my ASPNet I want to do something is the IE6 browser: http://MyIP/MyWeb.aspx?TestNo=LVp0XG2enhBUFifY+41kQ
and my C# program will decrypt the "LVp0XG2enhBUFifY+41kQ" to a real number.
However, the "+" in the "LVp0XG2enhBUFifY+41kQ" just appears as a space so
my
program can't decrypt correctly.
Would someone give me some advice?
Thanks for help.
Jason 6 1245
Sorry, need to make clarification.
I want to decrypt the "LVp0XG2enhBUFifY+41kQ" in the http://MyIP/MyWeb.aspx?TestNo=LVp0XG2enhBUFifY+41kQ,
but when I get the "LVp0XG2enhBUFifY+41kQ" from the browser, it becomes
"LVp0XG2enhBUFifY 41kQ",
the "+" character disappear, so the decrypt function won't work correctly.
"Jason Huang" <Ja************@hotmail.com¼¶¼g©ó¶l¥ó·s»D:Ow****** **********@TK2MSFTNGP06.phx.gbl...
Hi,
In my C# Net I have a string after encrypting as:
LVp0XG2enhBUFifY+41kQ
In my ASPNet I want to do something is the IE6 browser: http://MyIP/MyWeb.aspx?TestNo=LVp0XG2enhBUFifY+41kQ
and my C# program will decrypt the "LVp0XG2enhBUFifY+41kQ" to a real
number.
However, the "+" in the "LVp0XG2enhBUFifY+41kQ" just appears as a space so
my
program can't decrypt correctly.
Would someone give me some advice?
Thanks for help.
Jason
Jason Huang wrote:
Hi,
In my C# Net I have a string after encrypting as:
LVp0XG2enhBUFifY+41kQ
In my ASPNet I want to do something is the IE6 browser: http://MyIP/MyWeb.aspx?TestNo=LVp0XG2enhBUFifY+41kQ
and my C# program will decrypt the "LVp0XG2enhBUFifY+41kQ" to a real number.
However, the "+" in the "LVp0XG2enhBUFifY+41kQ" just appears as a space so
my
program can't decrypt correctly.
Would someone give me some advice?
Thanks for help.
Jason
You have to encode the value properly.
Use the Server.UrlEncode method to encode values to put in an url.
--
Göran Andersson
_____ http://www.guffa.com
On Wed, 11 Jul 2007 15:46:14 +0800, "Jason Huang"
<Ja************@hotmail.comwrote:
>Hi,
In my C# Net I have a string after encrypting as: LVp0XG2enhBUFifY+41kQ In my ASPNet I want to do something is the IE6 browser: http://MyIP/MyWeb.aspx?TestNo=LVp0XG2enhBUFifY+41kQ and my C# program will decrypt the "LVp0XG2enhBUFifY+41kQ" to a real number. However, the "+" in the "LVp0XG2enhBUFifY+41kQ" just appears as a space so my program can't decrypt correctly. Would someone give me some advice? Thanks for help.
Jason
Server.UrlEncode and Server.UrlDecode are your friends when it comes
to representing characters in URLs
-- http://bytes.thinkersroom.com
I use the Request.Url.ToString() method, cuz when I use the Server.UrlEncode
method,
there will have some '%' in my TestNo.
"Rad [Visual C# MVP]" <ra*@nospam.com>
???????:tq********************************@4ax.com ...
On Wed, 11 Jul 2007 15:46:14 +0800, "Jason Huang"
<Ja************@hotmail.comwrote:
>>Hi,
In my C# Net I have a string after encrypting as: LVp0XG2enhBUFifY+41kQ In my ASPNet I want to do something is the IE6 browser: http://MyIP/MyWeb.aspx?TestNo=LVp0XG2enhBUFifY+41kQ and my C# program will decrypt the "LVp0XG2enhBUFifY+41kQ" to a real number. However, the "+" in the "LVp0XG2enhBUFifY+41kQ" just appears as a space so my program can't decrypt correctly. Would someone give me some advice? Thanks for help.
Jason
Server.UrlEncode and Server.UrlDecode are your friends when it comes
to representing characters in URLs
-- http://bytes.thinkersroom.com
On Jul 12, 7:01 am, "Jason Huang" <JasonHuang8...@hotmail.comwrote:
I use the Request.Url.ToString() method, cuz when I use the Server.UrlEncode
method,
there will have some '%' in my TestNo.
The whole point of using Server.UrlEncode is to get the %s in there.
Then when you use Server.UrlDecode they should be removed, so you'll
have your original text again.
Jon
Jon Skeet [C# MVP] wrote:
On Jul 12, 7:01 am, "Jason Huang" <JasonHuang8...@hotmail.comwrote:
>I use the Request.Url.ToString() method, cuz when I use the Server.UrlEncode method, there will have some '%' in my TestNo.
The whole point of using Server.UrlEncode is to get the %s in there.
Then when you use Server.UrlDecode they should be removed, so you'll
have your original text again.
Jon
Only, you don't use Server.UrlDecode yourself. That is done
automatically when the values are put in the Request.QueryString
collection. :)
--
Göran Andersson
_____ http://www.guffa.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Cardman |
last post by:
Greetings,
I am trying to solve a problem that has been inflicting my self
created Order Forms for a long time, where the problem is that as I
cannot reproduce this error myself, then it is...
|
by: John Viele |
last post by:
Every time I create ASP.NET pages that do any significant data access, I
find myself having to deal with the same problems: managing data object
creation, the SQL connection object especially.
...
|
by: BryanEverly |
last post by:
Hi,
I'm struggling with a problem and was hoping that someone on this group
could point me in the right direction. I'm not looking for a free ride, just
a suggestion as to how best to use all...
|
by: Michael B. |
last post by:
I was just thinking about this, specifically wondering if there's any
features that the C specification currently lacks, and which may be
included in some future standardization.
Of course, I...
|
by: Rano |
last post by:
/*
Hello,
I've got some troubles with a stupid program...
In fact, I just start with the C language and sometime
I don't understand how I really have to use malloc.
I've readden the FAQ...
|
by: TPJ |
last post by:
Help me please, because I really don't get it. I think it's some stupid
mistake I make, but I just can't find it. I have been thinking about it
for three days so far and I still haven't found any...
|
by: felixnielsen |
last post by:
Some might remember that i, not so long ago, started a treath or two
about a weird 3d labyrinth. I now have a working code, that i want to
share, hear comments, advice, ect., but first let me...
|
by: Chris F Clark |
last post by:
Please excuse the length of this post, I am unfortunately long-winded,
and don't know how to make my postings more brief.
I have a C++ class library (and application generator, called
Yacc++(r)...
|
by: naknak4 |
last post by:
Introduction
This assignment requires you to develop solutions to the given problem
using several different approaches (which actually involves using three
different STL containers). You will...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |