URLEncode

I'm trying to pass a URL parameter from one ASP page to a recordset on another (workng with SQL Server). The strings all have three '-', and some additionally have '&'.
I used URLEncode, because the strings with '&' don't pass properly, although the others do. However, even with URLEncode, the recordset on the second page still comes up empty - the strings still don't seem to encode. This is

ASP Code:
<a href="javascript:popUp('locInfo.asp?locCode=<%=Server.URLEncode(rsHighRating.Fields.Item("locCode").Value)%>')"><%=(rsHighRating.Fields.Item("locCode").Value)%></a>

The recordset on the locInfo.asp page filters by the locCode, it is set up as Request.QueryString, and does indeed work for all the codes without '&'.
Can anyone point out where I might be going wrong?

View Replies


ADVERTISEMENT

Using URLencode

<A href= "GenericUploader.asp?SavePath=<%=server.URLEncode("D:my new
web siteU") %>">folder name</A>

the link above does not seem to produce the appropriate query string value upon being clicked on. That is, when an internet user clicks on that link, the Internet Explorer opens the GenericUploader.asp web page, and the code in that asp web page responsible for picking up the value corresponding to the argument 'SavePath' (i.e, request.querystring("SavePath")) returns solely the first word of the value rather than the entire CORERECT value, which is 'D:my'rather than 'D:my new web siteU'.what needs to be done?

View Replies View Related

URLEncode

I'm having a strange problem with URLEncode. When I use the following code, it works:

m1 = server.URLEncode(m1)

Now if I add another line for another variable I get a type mismatch error:

m1 = server.URLEncode(m1)
m2 = server.URLEncode(m2)

The error is: Microsoft VBScript runtime error '800a000d' Type mismatch: 'Server.URLEncode'

It doesn't matter which one I do buy itself, if I do , it works. If I have more than one use of URLEncode, I get the error. Both variables are dimensioned like (dim m1).

View Replies View Related

UTF-8 And Server.URLEncode

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:

My Fiancé

which doesn't appear correct. When I take out the <%
Response.charset="utf-8"%line, it returns

My Fiancé

which displays correctly. Am i ok to just leave out the <%
Response.charset="utf-8"%line, or should I use a different charset?
or is there some other fix?

View Replies View Related

Server.URLEncode

I've encountered an issue and I'm not sure what's going on. I've encoded the values in a querystring. When you hover over the link, it doesn't appear to be encoded properly. But if you viewed the source of the page, it's encoded correctly?

wrong:
cp=ASF-4204=4PDT

right:
cp=ASF%2D4204%3D4PDT

The problem is with the "=" in the first example. Can anyone explain what's going on and how I can fix this?

View Replies View Related

Server.URLEncode

If I redirect a user to a page and encode the url, do I need to decode it on
the page they are redirected to.

For Eample..

Response.Redirect (Server.URLEncode(http://mysite/test.asp?id=1))

In this case do I need to decode the URL before I can do a
Request.QueryString("id")?

View Replies View Related

Server.URLEncode

When using Server.URLEncode, is there a way to undo what was encoded? I suppose I could use REPLACE if I knew exactly what the original string was. But what if I didn't know?

Apt #1 transforms to Apt+%231 how do I get it back to Apt #1 ...?

View Replies View Related

Using Server.Urlencode

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=myserverattachments<%=server.urlencode(rs("FileName"))%>
target="_blank" ><%=rs("Filename")%>

Sometimes the hyperlinks works but sometimes it doesn't.Should I be using server.urlencode or not. The problem is my users upload files with all sorts of filename slike

088-888 24(05)-774448.doc which includes spaces, special characters etc.

View Replies View Related

Difference In URLEncode

Can someone shed light on this: -

When I search for 'ô', the url encode shows a "%F4", whereas should I show a "%C3%B4"

View Replies View Related

Un-encoding Server.URLEncode

There has to be a simple method for un-encoding output from Server.URLEncode or Server.HTMLEncode using server-side VBScript but I just can't find it. I'd appreciate it very much if some sharp individual here would shove me in the right direction.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved