473,698 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Difference between System.Web.Http Utility.UrlEnco de and Server.UrlEncod e?

Hello,

is there a difference between

System.Web.Http Utility.UrlEnco de

and

Server.UrlEncod e ?
Thanks in advance,
Andreas
Nov 18 '05 #1
4 6737
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******@hotma il.com> wrote in message
news:eV******** ******@TK2MSFTN GP12.phx.gbl...
Hello,

is there a difference between

System.Web.Http Utility.UrlEnco de

and

Server.UrlEncod e ?
Thanks in advance,
Andreas

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

is there a difference between

System.Web.Http Utility.UrlEnco de

and

Server.UrlEncod e ?
Thanks in advance,
Andreas


No.

Server.UrlEncod e() calls HttpUtility.Url Encode() to do its work. It just
makes sure that the encoding specified in the HTTP headers
(Response.Conte ntEncoding) 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******** ********@TK2MSF TNGP11.phx.gbl. ..
Andreas Klemt wrote:
Hello,

is there a difference between

System.Web.Http Utility.UrlEnco de

and

Server.UrlEncod e ?
Thanks in advance,
Andreas


No.

Server.UrlEncod e() calls HttpUtility.Url Encode() to do its work. It just
makes sure that the encoding specified in the HTTP headers
(Response.Conte ntEncoding) 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.UrlEncod e( s)

is equivalent to

HttpUtility.Url Encode( s, Response.Conten tEncoding)

Basically Server.UrlEncod e() 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******** ********@TK2MSF TNGP11.phx.gbl. ..
Andreas Klemt wrote:
Hello,

is there a difference between

System.Web.H ttpUtility.UrlE ncode

and

Server.UrlEn code ?
Thanks in advance,
Andreas


No.

Server.UrlEnc ode() calls HttpUtility.Url Encode() to do its work. It just
makes sure that the encoding specified in the HTTP headers
(Response.Con tentEncoding) 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
3168
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. However, some of the data has apostrophies (') in it, so the page does not redirect properly (invalid syntax) because of the apostrophy. so i tried to use the URL encode to get around this to no avail - it doesnt
3
5150
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://" s = s & Request.ServerVariables("HTTP_HOST") s = s & Request.ServerVariables("URL") If Request.QueryString.Count > 0 Then s = s & "?" & Request.QueryString
3
7647
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 the following code <a href=\myserver\attachments\<%=server.urlencode(rs("FileName"))%> target="_blank" ><%=rs("Filename")%>
1
1623
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. Response.Redirect("Server.UrlEncode(""login.aspx?res=no&url=page2.aspx"")")
1
5368
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
1215
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 I Can't Show"
9
4498
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: %c2%90%c2%bb%c3%81%c3%8f%7f%c5%92%c5%a0%cb%9c%c2%aa%c5%92%c2%9d%e2%80%bah%5eaYh in ASP script (using Server.URLEncode) I get: %90%BB%C1%CF%7F%8C%8A%98%AA%8C%9D%9Bh%5EaYh
1
9519
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 Server.HTMLEncode to a field that was inputted from the user. The problem is that when the user enters a phrase such as: My Fianc The Server.URLEncode returns the value:
3
2915
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
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9026
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2328
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.