473,322 Members | 1,494 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,322 software developers and data experts.

Passing data between pages using cookies.

I have one ASPX page that calls another using server transfer as shown
below. The problem is that I do not get the cookie in the second page. The
value seems to be blank.

Any help would be appreciated.

Thanks,

Jim

Button_Click Proceedure.......
Dim Cookie As HttpCookie

Cookie = New HttpCookie("SSS")

Cookie.Values.Add("UserCompanyID", txtID.Text)

Response.AppendCookie(Cookie)

Server.Transfer("SLNet_Opportunity.aspx")

In the second page, I have the following code in the page load event.
Dim Cookie As HttpCookie

Cookie = Request.Cookies("SSS")

TextBox3.Text = Cookie.Values("UserCompanyID")
Jul 19 '05 #1
1 3694
as server transfer does not send data to the browser, nor did the browser
post any data back, there are no cookies. you have to get them from the
original page instance, and send back to the browser if you want it to know
about them.
-- bruce (sqlwork.com)


"Jim Mitchell" <ji**********@mindspring.com> wrote in message
news:#y**************@TK2MSFTNGP11.phx.gbl...
I have one ASPX page that calls another using server transfer as shown
below. The problem is that I do not get the cookie in the second page. The value seems to be blank.

Any help would be appreciated.

Thanks,

Jim

Button_Click Proceedure.......
Dim Cookie As HttpCookie

Cookie = New HttpCookie("SSS")

Cookie.Values.Add("UserCompanyID", txtID.Text)

Response.AppendCookie(Cookie)

Server.Transfer("SLNet_Opportunity.aspx")

In the second page, I have the following code in the page load event.
Dim Cookie As HttpCookie

Cookie = Request.Cookies("SSS")

TextBox3.Text = Cookie.Values("UserCompanyID")

Jul 19 '05 #2

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

Similar topics

5
by: Paul | last post by:
I want to use sessions to cover myself in case the user switches off cookies so I am passing the session ID manually through a hidden input field. This is what I have so far. index.php page...
1
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains:...
6
by: Rob Meade | last post by:
Hi all, At work we have 2 servers in a cluster for our web apps. One problem we have experienced (along with many others!) - is that if a user is logged into one of the applications on server...
3
by: ben | last post by:
Hi guyz, I am developing a website using php.This website involves dealing with forms which span over multiple pages. I want data obtained from 1 form to be available after 3-4 pages. This...
1
by: olduncleamos | last post by:
Hello all. With a background in ASP, I am finding the work required for passing values between pages mystifying. For various obvious reasons, I have eliminated using cookies and session to store...
2
by: Jim Mitchell | last post by:
I have one ASPX page that calls another using server transfer as shown below. The problem is that I do not get the cookie in the second page. The value seems to be blank. Any help would be...
28
by: Skeets | last post by:
i'm passing session and hidden variables between pages. not to mention post values. i'm a little concerned that someone with sufficient knowledge could spoof these vlaues and manipulate the...
22
by: K. A. | last post by:
I have two servers at work, 'A' for testing and development, and server 'B' for production. On server A, I wrote a PHP test code to login users then direct them to a personalized page. This is...
10
BezerkRogue
by: BezerkRogue | last post by:
I am trying to use cookies to manage session states in an ASP.NET application. The states need to persist only while the browser session is open. My web.config setting is: <system.web>...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.