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

best way to transfer variables from 1 page to a 2nd to a 3rd page

Have a multi-page subscribtion.
So the user fills in some data on the first page, than an other part on the
2nd and the last part on the 3rd page.

What is the best and simplest way to get all the inserted data on the 3rd
page to insert in de dbase?
(not using request.querystring! as this is not secure)

I tried with context, but I can't manage it to work.

Thanks.
Nov 19 '05 #1
5 1019
nicholas wrote:
Have a multi-page subscribtion.
So the user fills in some data on the first page, than an other part
on the 2nd and the last part on the 3rd page.

What is the best and simplest way to get all the inserted data on the
3rd page to insert in de dbase?
(not using request.querystring! as this is not secure)

I tried with context, but I can't manage it to work.

Thanks.


You need Session.

page 1: Session["somekey"] = somevalue;

page 2: myvar = (type)Session["somekey"];

Session stores everything as Object, so when you retrieve the value, you need to cast.
Hans Kesting
Nov 19 '05 #2
Nicholas,

Try using Server.Execute or Server.Transfer depending on your need. Also
consider using a public property in the first page which can be accessed
from the second page.

- Anand

"nicholas" <mu********@hotmail.com> wrote in message
news:uJ**************@tk2msftngp13.phx.gbl...
Have a multi-page subscribtion.
So the user fills in some data on the first page, than an other part on the 2nd and the last part on the 3rd page.

What is the best and simplest way to get all the inserted data on the 3rd
page to insert in de dbase?
(not using request.querystring! as this is not secure)

I tried with context, but I can't manage it to work.

Thanks.

Nov 19 '05 #3
thx, but I don't realy like this method.
It's good if you don't have too much variables.

I solved my problem by using "panels".
So there is just 1 form left.

THX anyway.

"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:eQ**************@TK2MSFTNGP12.phx.gbl...
nicholas wrote:
Have a multi-page subscribtion.
So the user fills in some data on the first page, than an other part
on the 2nd and the last part on the 3rd page.

What is the best and simplest way to get all the inserted data on the
3rd page to insert in de dbase?
(not using request.querystring! as this is not secure)

I tried with context, but I can't manage it to work.

Thanks.
You need Session.

page 1: Session["somekey"] = somevalue;

page 2: myvar = (type)Session["somekey"];

Session stores everything as Object, so when you retrieve the value, you

need to cast.

Hans Kesting

Nov 19 '05 #4
Anand S wrote:
Nicholas,

Try using Server.Execute or Server.Transfer depending on your need.
Also consider using a public property in the first page which can be
accessed from the second page.

For ASP.Net public properties on pages don't work. You have only a
"live instance" of the current page, not of any previous pages.

- Anand

"nicholas" <mu********@hotmail.com> wrote in message
news:uJ**************@tk2msftngp13.phx.gbl...
Have a multi-page subscribtion.
So the user fills in some data on the first page, than an other part
on the 2nd and the last part on the 3rd page.

What is the best and simplest way to get all the inserted data on
the 3rd page to insert in de dbase?
(not using request.querystring! as this is not secure)

I tried with context, but I can't manage it to work.

Thanks.

Nov 19 '05 #5
nicholas wrote:
thx, but I don't realy like this method.
It's good if you don't have too much variables.


You don't have to store just "strings" and "ints" in Session, you can also
define your own classes that hold a number of values. You can store that
class (instance) under a single key in Session.

But "panels" is a good solution, just as long as you maintain the "postback"
flow (you can't just redirect to an other page, then you lose all data)

Hans Kesting
Nov 19 '05 #6

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

Similar topics

6
by: StephenMcC | last post by:
Hi All, Got a quick query in relation to the Server.Transfer method available in IIS 5+/ASP. I've got an issue where I want to take a portion of an online app and extract this out into a web...
5
by: Tom | last post by:
Hi I am trying to transfer to a different .ASPX page using Server.Transfer. However, I get the following error: "Error executing child request for .aspx." Anyone know why? Thanks for...
0
by: Amar | last post by:
After using Server.Transfer to transfer data from one page to another, I would like to know if there is a way to keep the receiving web page variables intact after a postback. Here is the code...
8
by: Cathie | last post by:
Hi guys, I want to do a Server.Transfer to get to a second page, so that I may retrieve variables I have set in the first page. I'm doing that with the usual Server.Transfer("pagename", true). ...
4
by: Bob H | last post by:
Hi, I'm aware of the different ways to pass variables between ASP.Net pages. For pages that need to pass a variable, we're using the server.transfer method. For others, we're using...
8
by: darrel | last post by:
I'm still trying to fully understand how best to pass variables between pages/usercontrols/each other. On a current site I've done, I've had one userControl do the logic and set the variable,...
3
by: Calvin KD | last post by:
Hi everyone, I don't know if there's anyone out there is having the same problem. My DotNet 1.1 version uses FormsAuthentication.RedirectFromLoginPage() method to take user from the Login page to...
3
by: Alan Silver | last post by:
Hello, Sorry if this is a stupid question, but I can't really see much difference between these tow methods according to the scant info in the SDK. Could anyone enlighten me? TIA -- Alan...
4
by: evantay | last post by:
I'm using ASP.NET 2.0 with VS.NET 2005. I'm trying to access properties from my master pages within a page that inherits from that master page (a child page). However the values are always null....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.