473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Difference between System.Web.HttpUtility.UrlEncode and Server.UrlEncode?

Hello,

is there a difference between

System.Web.HttpUtility.UrlEncode

and

Server.UrlEncode ?
Thanks in advance,
Andreas
Nov 18 '05 #1
4 6711
as far as i know, the latter is available in VB, and not c#.

but they'll be the same function, but in different places for difference
people.

Dan.
"Andreas Klemt" <ak******@hotmail.com> wrote in message
news:eV**************@TK2MSFTNGP12.phx.gbl...
Hello,

is there a difference between

System.Web.HttpUtility.UrlEncode

and

Server.UrlEncode ?
Thanks in advance,
Andreas

Nov 18 '05 #2
Andreas Klemt wrote:
Hello,

is there a difference between

System.Web.HttpUtility.UrlEncode

and

Server.UrlEncode ?
Thanks in advance,
Andreas


No.

Server.UrlEncode() calls HttpUtility.UrlEncode() to do its work. It just
makes sure that the encoding specified in the HTTP headers
(Response.ContentEncoding) is used (if any).

--
mikeb
Nov 18 '05 #3
Hello Mikeb,
thanks for your answer.
But how can I find out for the furture which function is calling which
function?
I am working with Visual Studio .NET

Thanks,
Andreas

"mikeb" <ma************@mailnull.com> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
Andreas Klemt wrote:
Hello,

is there a difference between

System.Web.HttpUtility.UrlEncode

and

Server.UrlEncode ?
Thanks in advance,
Andreas


No.

Server.UrlEncode() calls HttpUtility.UrlEncode() to do its work. It just
makes sure that the encoding specified in the HTTP headers
(Response.ContentEncoding) is used (if any).

--
mikeb

Nov 18 '05 #4
Andreas Klemt wrote:
Hello Mikeb,
thanks for your answer.
But how can I find out for the furture which function is calling which
function?
I am working with Visual Studio .NET
I'm not sure what you're asking.

Server.UrlEncode( s)

is equivalent to

HttpUtility.UrlEncode( s, Response.ContentEncoding)

Basically Server.UrlEncode() is implemented as a convenience and to
provide backward compatibility with Classic ASP.

Call whichever one you like.

Thanks,
Andreas

"mikeb" <ma************@mailnull.com> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...
Andreas Klemt wrote:
Hello,

is there a difference between

System.Web.HttpUtility.UrlEncode

and

Server.UrlEncode ?
Thanks in advance,
Andreas


No.

Server.UrlEncode() calls HttpUtility.UrlEncode() to do its work. It just
makes sure that the encoding specified in the HTTP headers
(Response.ContentEncoding) is used (if any).

--
mikeb


--
mikeb
Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Fawke101 | last post by:
Hi there, I am having trouble with some data that is ripped from a SQL database and displayed as a hyperlink. The hyperlink inserts the data into a querystring so the next page can read it. ...
3
by: George Hester | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en-us;301464 Look down at the MyPage.asp example. You will see that Microsoft does this: 'Costruct the URL for the current page s = "http://"...
3
by: JP SIngh | last post by:
Hi All I have users who upload files using my application using ASPUPLOAD component. My code uploads the file to a network location and once the upload is finish I display the hyperlink using...
1
by: msn | last post by:
Invalid file name for monitoring: 'E:\inetpub\wwwroot\xxxxxxx\xxxxxxx\Server.UrlEncode("login.aspx'. File names for monitoring must have absolute paths, and no wildcards. ...
1
by: Dario Sala | last post by:
Hi, what's the difference about Asp Server.UrlEncode and the Asp.Net Server.UrlEncode ? In asp: Server.UrlEncode("*") = %2A In Asp.Net: Server.UrlEncode("*") = *
0
by: Nathan Sokalski | last post by:
I am using Server.UrlEncode to make a piece of data safe to use as a QueryString. The data I am using is as follows: ratedpoem("title") Which returns the following String: "An Expression...
9
by: Mark_Rarefy | last post by:
Trying to urlencode this string: »ÁÏŒŠ˜ªŒ›h^aYh in vb.net (using either HttpUtility.UrlEncode(strEncrypted, encoding.UTF8) orServer.UrlEncode) I get:...
1
by: burnsy2000 | last post by:
We are running ASP classic on IIS 5 on W2k SP4. We recently added <% Response.charset="utf-8"%to the top of all our pages (as suggested by validator.w3.org). A problem arose on a page which applies...
3
by: Cirene | last post by:
Why is it when i try to use server.urlencode in a winform app that it can't seem to locate the function? (I am utilizing the browser control.) Thanks!
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
Oralloy
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,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.