By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,871 Members | 2,595 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,871 IT Pros & Developers. It's quick & easy.

Redirect Help with URL

P: 2
I am having an issue with redirection to a document.

Here is the scenario;

The user fills out some form information and upon submission is taken to a specific page in a pdf file. Everything to this point is working fine, the problem I keep facing is that the browser is changing the URL when it gets sent from the ASP script.

I.E. the url is something like this : library/sop/sop.pdf#page=234

When it gets sent to the browser the equal sign is being replaced by it's hex equivalent (%3D).

So I end up getting this: library/sop/sop.pdf#page%3D234. The file will still open but it will not go to the correct page.

Can anyone shed some light on this? I have tried several different things but none have seemed to work in keeping the browser from changing the =.

Jun 20 '06 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,754
Hi Morey,

emm.. lets assume that the "page" keyword is your querystring.. rite..

so on your asp. script do the following..
<a href=../somewhere/somefile.asp?page=<%=Server.URLEncode("something_w here")%>Something</a>
Jun 20 '06 #2

P: 2
Sahsi, thanks for the reply.

First, I forgot to mention that I am very new to ASP and am learning as I putter along. Also, I am calling the page from a Response.Redirect. If it helps the page number is set to a variable because it will be changing from time to time.

I have been able to get the desired result from just creating a Response.Write link, but I really just want to page to be called up automatically.

Here are a couple of version I have tried that worked, but again the equal sign kept getting changed.

DIM Page
Page = "="+Request.Form("Page")

Response.Redirect "../library/sop.pdf#page"+ Server.URLEncode(Page)

URL = "../library/sop.pdf#page=" + Page
Response.Redirect URL

Jun 20 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.