Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

response.redirect

Status
Not open for further replies.

A1Pat

IS-IT--Management
Joined
Jun 7, 2004
Messages
454
Location
US
Hello all,
I have a product page that has a format 10 items per page. Right now, whenever I edit an item, after I hit save, my RESPONSE.REDIRECT will send me back to page 1, doesn't matter what page I was in earlier.

Response.Redirect "../default.asp?type=0"

What I want is to take me back to the previous particular page that I was in when I edit a product from after I hit save. My way of solving the problem is to add:

Response.Redirect "../default.asp?type=0&page=request.querystring("page")"

which page number is refered to by a string pass through with a edit's URL info:

<a href="printers/edit.asp?productid=<% =rsPrinter("ProductID") %>&page=request.querystring("page")">edit</a>

I don't know whether the modification will work or not but I believe there's better way to go back or something.

Thanks!
 
Thats a perfectly good way to go back except for one minor issue:
Code:
<a href="printers/edit.asp?productid=<% =rsPrinter("ProductID") %>&page=[highlight]<%=[/hghlight]request.querystring("page")[highlight]%>[/hghlight]">edit</a>

you want the value of that to be passed to the HTML, not the words :)

-T

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
re-posting for tarwn, so the typo doesn't make the code look so garbled

Code:
<a href="printers/edit.asp?productid=<% =rsPrinter("ProductID") %>&page=[highlight]<%=[/highlight]request.querystring("page")[highlight]%>[/highlight]">edit</a>

[thumbsup2]DreX
aKa - Robert
 
:) thanks both Tarwn and DreXor for the pointing out, but that just a typo I had when I typed in here. My source code is ok.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top