473,404 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Is there a way to send info to another page without posting or using querystring?

Hello,

I have a page where users can alter the contents of a shopping basket.
Once they are happy with the contents, they click a "checkout" button
and are taken to the checkout page.

What actually happens is that the "checkout" button causes a normal
postback, where some work is done before redirecting them to the
checkout page. I need to pass the basket ID to the checkout page, but
don't want to put it in the querystring as I don't want the user seeing
it. I can't (AFAIK) post to the checkout page as I'm doing this from the
code behind the basket page.

Any suggestions how I get the basket ID across without the user seeing
it? I thought about creating a session variable, then doing a
Response.Redirect and picking up the session variable in the checkout
page. That page would empty the session variable once it has been read.
This would probably work, but seems messy. Anyone got a neater solution?

TIA

--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #1
6 1250
pass it to a DB and reread it in on the next page...but again you would need
an unique ID to differentiate the user. The session (or cookie) storage of
the id is probably your best bet....

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Alan Silver" wrote:
Hello,

I have a page where users can alter the contents of a shopping basket.
Once they are happy with the contents, they click a "checkout" button
and are taken to the checkout page.

What actually happens is that the "checkout" button causes a normal
postback, where some work is done before redirecting them to the
checkout page. I need to pass the basket ID to the checkout page, but
don't want to put it in the querystring as I don't want the user seeing
it. I can't (AFAIK) post to the checkout page as I'm doing this from the
code behind the basket page.

Any suggestions how I get the basket ID across without the user seeing
it? I thought about creating a session variable, then doing a
Response.Redirect and picking up the session variable in the checkout
page. That page would empty the session variable once it has been read.
This would probably work, but seems messy. Anyone got a neater solution?

TIA

--
Alan Silver
(anything added below this line is nothing to do with me)

Nov 19 '05 #2
You could set a cookie. I personally like session and would choose that over
using a cookie, however.
"Alan Silver" wrote:
Hello,

I have a page where users can alter the contents of a shopping basket.
Once they are happy with the contents, they click a "checkout" button
and are taken to the checkout page.

What actually happens is that the "checkout" button causes a normal
postback, where some work is done before redirecting them to the
checkout page. I need to pass the basket ID to the checkout page, but
don't want to put it in the querystring as I don't want the user seeing
it. I can't (AFAIK) post to the checkout page as I'm doing this from the
code behind the basket page.

Any suggestions how I get the basket ID across without the user seeing
it? I thought about creating a session variable, then doing a
Response.Redirect and picking up the session variable in the checkout
page. That page would empty the session variable once it has been read.
This would probably work, but seems messy. Anyone got a neater solution?

TIA

--
Alan Silver
(anything added below this line is nothing to do with me)

Nov 19 '05 #3
Alan,

You could use Server.Transfer and pass the id to the new page in the context
object of the page.

Page1:

Context.Items.Add("BasketId", Value)
Server.Transfer("Page2.aspx")

Page2:

Dim BasketId As Int32 = Ctype(Context.Items.Item("BasketId"), Int32)

The only thing is that Server.Transfer bypasses the client so the client
will still have page1's web address in the address bar when the client shows
up on the checkout page. But that shouldn't matter...

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Alan Silver" <al*********@nospam.thanx> wrote in message
news:eJ**************@nospamthankyou.spam...
Hello,

I have a page where users can alter the contents of a shopping basket.
Once they are happy with the contents, they click a "checkout" button and
are taken to the checkout page.

What actually happens is that the "checkout" button causes a normal
postback, where some work is done before redirecting them to the checkout
page. I need to pass the basket ID to the checkout page, but don't want to
put it in the querystring as I don't want the user seeing it. I can't
(AFAIK) post to the checkout page as I'm doing this from the code behind
the basket page.

Any suggestions how I get the basket ID across without the user seeing it?
I thought about creating a session variable, then doing a
Response.Redirect and picking up the session variable in the checkout
page. That page would empty the session variable once it has been read.
This would probably work, but seems messy. Anyone got a neater solution?

TIA

--
Alan Silver
(anything added below this line is nothing to do with me)

Nov 19 '05 #4
Thanks to all of you for your replies. I just realised that using a
cookie or session variable is going to be a problem as I will be
redirecting to a page on another server (a secure one, unlike the main
site), so cookies and session variables will not be shared.

I have previously fiddled my way around this by including a dummy <img>
tag on the page, with the src of the image being set to a dynamic page
on the other server. That page sets a cookie and then returns some dummy
image. This is a trick to set a cookie on another server. I may try that
here.

As for the idea below, it looks clever, but I had a lot of problems
getting it to work neatly. I think I will try the above idea first and
see how that works.

Thanks again to all of you.
You could use Server.Transfer and pass the id to the new page in the context
object of the page.

Page1:

Context.Items.Add("BasketId", Value)
Server.Transfer("Page2.aspx")

Page2:

Dim BasketId As Int32 = Ctype(Context.Items.Item("BasketId"), Int32)

The only thing is that Server.Transfer bypasses the client so the client
will still have page1's web address in the address bar when the client shows
up on the checkout page. But that shouldn't matter...


--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #5
Alan,

I wasn't aware that the new page was on a different site/server.
Server.Transfer only works within a single application.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Alan Silver" <al*********@nospam.thanx> wrote in message
news:n8**************@nospamthankyou.spam...
Thanks to all of you for your replies. I just realised that using a cookie
or session variable is going to be a problem as I will be redirecting to a
page on another server (a secure one, unlike the main site), so cookies
and session variables will not be shared.

I have previously fiddled my way around this by including a dummy <img>
tag on the page, with the src of the image being set to a dynamic page on
the other server. That page sets a cookie and then returns some dummy
image. This is a trick to set a cookie on another server. I may try that
here.

As for the idea below, it looks clever, but I had a lot of problems
getting it to work neatly. I think I will try the above idea first and see
how that works.

Thanks again to all of you.
You could use Server.Transfer and pass the id to the new page in the
context
object of the page.

Page1:

Context.Items.Add("BasketId", Value)
Server.Transfer("Page2.aspx")

Page2:

Dim BasketId As Int32 = Ctype(Context.Items.Item("BasketId"), Int32)

The only thing is that Server.Transfer bypasses the client so the client
will still have page1's web address in the address bar when the client
shows
up on the checkout page. But that shouldn't matter...


--
Alan Silver
(anything added below this line is nothing to do with me)

Nov 19 '05 #6
>I wasn't aware that the new page was on a different site/server.
Server.Transfer only works within a single application.


Yup, my fault, I forgot to mention it. That's why I added the extra post
as it occurred to me that it would change things rather a lot.

I am currently thinking about having a page on the remote server that
takes the ID in the querystring, sets a cookie and immediately redirects
to another page on that server. The user would (hopefully) not see the
intermediate page, so the ID wouldn't be quite so obvious. I'm resigned
to the fact that it's very hard to hide it completely, but this may be
acceptable.

Thanks for the reply.

--
Alan Silver
(anything added below this line is nothing to do with me)
Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ij | last post by:
Hi, I'm trying to submit an image object, along with some other text fields to another web server from within an ASP page but am stuck on getting the image to be submitted with the form. In a...
5
by: RICHARD BROMBERG | last post by:
I am already using ASP/Cdonts to send the contents of a Form by e-mail and would like to include a link on my page to send the page itself by e-mail to a named recipient. Can anyone start me in...
4
by: Mark J. McGinty | last post by:
Greets, Part of the content of one of our web pages uses wingdings and Chr(239) through Chr(242) (which are little arrow outlines, though that's not really important.) It worked just fine in...
4
by: Newbie | last post by:
Hi, I need help in posting asp .net application web form to another asp based web app. I have seen many examples using HttpWebRequest class but the problem is I do not want the request back...
1
by: Chris | last post by:
Hi, how can I send information that is in the Response.OutputStream to the client but continue server processing without having to close the page , or without having to Reponse.End() the...
9
by: eswanson | last post by:
I have a web page I need to post a file plus some other fields to it. How can I do this from a asp.net page. I know I can send individual fields to the other page, but how do I send a file to the...
17
by: Rabbit | last post by:
Hi, On my 1st page, i have a function which gets a new ID value and need to transfer to another immediately. which I want to get in 2nd page using Request.form("txtID"), but doesn't work, the...
3
by: keith.schincke | last post by:
I know I must be missing something basic. I am developing of Firefox 1.5 and am trying to to send a basic QUERY_STRING to a test CGI that will print the data back to the brower: I can print my...
11
by: cdkorzen | last post by:
I'm sorry if this is a rehash, but all I see is the same info. Here's my debacle: I CAN get the PATH_INFO to work. With ANYTHING but ASP. Python, Perl, Cmd files... works fine. ASP can't...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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 project—planning, coding, testing,...
0
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...

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.