Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > problem with urlencode and ampersand

Thread Tools

problem with urlencode and ampersand

Posts: n/a
Server.UrlEncode is not longer converting the ampersand in a string to
%26 so the value passed in the querystring gets truncated in the
following page. Is this a problem with IIS, does anyone know? I can't
find this reported anywhere else. I may just have to code around it.
link is created by the following code:
<a>href="GroupDetails.asp?groupName=<%=Server.URLE ncode(objRecordset("Group_Name"))%>">Group

If Group_Name contains an ampersand, this appears as & in the
querystring instead of being converted by URLEncode to %26. When the
groupName querystring value is used in the new page, it is truncated.
So "A & M AllStars" is truncated to "A".

However, this only occurs in 1 environment, in our dev environment it
works fine and converts ampersand so it doesn't muck up the
querystring. I can't find any obvious setting in IIS which would
affect this, but presumably it must be happening on the server and is
nothing to do with browser, browser version etc. I assume a security
patch has caused this. Any help would be appreciated.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ampersand creating problem in IE6 innerHTML property Kiran Makam Javascript 4 08-26-2008 02:59 PM
Ampersand problem Rodusa ASP .Net 3 02-09-2005 02:33 PM
asp server.UrlEncode VS Server.UrlEncode Vs Php urlencode Dario Sala ASP .Net 1 11-15-2004 11:27 PM
ASP.NET Httphandler and file names with ampersand = 404 Error. Please help. Prasanna Padmanabhan ASP .Net 1 07-08-2004 02:30 PM
Difference between System.Web.HttpUtility.UrlEncode and Server.UrlEncode? Andreas Klemt ASP .Net 4 01-22-2004 01:35 AM