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

Passing data between pages?

For a website that has users logged into it using sessions, its it best to
pass data between pages in session variables or through query strings?
Jun 23 '06 #1
7 1865
It depends on what data you are passing, how much data you are passing and
how that data will be used.

If the data needs to be secured or there will be more than 1K of data, then
QueryStrings are out. On the other hand, sessions (if not used right) can
be costly to the server and in web farm environments won't work.

The most secure and robust way is to store the data in a database.

"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:uV**************@TK2MSFTNGP05.phx.gbl...
For a website that has users logged into it using sessions, its it best to
pass data between pages in session variables or through query strings?

Jun 23 '06 #2
My preference is to use Server.Transfer and HTTPContext.Items to pass data
between pages, and I am willing to live with out-of-sync URL. I minimize the
use of session to absolute mininal for resource conservation reason. I do
not use query string ask I don't like people hacking with the query strings.
If I were to use query string I would encrypt it.

"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:uV**************@TK2MSFTNGP05.phx.gbl...
For a website that has users logged into it using sessions, its it best to
pass data between pages in session variables or through query strings?

Jun 23 '06 #3
Here's another nice, simple way to pass values from one page to another:
(VB.NET code)

'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("handle_error.aspx ")

Then, in handle_error.aspx.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)

Of course there are a number of ways to pass values from one page to another
besides the querystring there are cookies, session, context, saving to a
temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.

Here are more good articles on the subject:
http://SteveOrr.net/faq/PassValues.aspx
http://www.aspalliance.com/kenc/passval.aspx
http://msdn.microsoft.com/msdnmag/is...e/default.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:uV**************@TK2MSFTNGP05.phx.gbl...
For a website that has users logged into it using sessions, its it best to
pass data between pages in session variables or through query strings?

Jun 23 '06 #4
well for example I need to pass this set of information from page to page
which may different pages may change the information..

Folder (path on a hierachy of data currently on, string under 200 chars)
MessageID (ID of node in the folder, Int64)
ActionGUID (Unique ID of last action performed)

besides that, not much else will be there...

"Scott M." <s-***@nospam.nospam> wrote in message
news:Ou**************@TK2MSFTNGP05.phx.gbl...
It depends on what data you are passing, how much data you are passing and
how that data will be used.

If the data needs to be secured or there will be more than 1K of data,
then QueryStrings are out. On the other hand, sessions (if not used
right) can be costly to the server and in web farm environments won't
work.

The most secure and robust way is to store the data in a database.

"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:uV**************@TK2MSFTNGP05.phx.gbl...
For a website that has users logged into it using sessions, its it best
to pass data between pages in session variables or through query strings?


Jun 23 '06 #5
And what if someone hacks your querystring by forcing different data into
it?
"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:u%****************@TK2MSFTNGP05.phx.gbl...
well for example I need to pass this set of information from page to page
which may different pages may change the information..

Folder (path on a hierachy of data currently on, string under 200 chars)
MessageID (ID of node in the folder, Int64)
ActionGUID (Unique ID of last action performed)

besides that, not much else will be there...

"Scott M." <s-***@nospam.nospam> wrote in message
news:Ou**************@TK2MSFTNGP05.phx.gbl...
It depends on what data you are passing, how much data you are passing
and how that data will be used.

If the data needs to be secured or there will be more than 1K of data,
then QueryStrings are out. On the other hand, sessions (if not used
right) can be costly to the server and in web farm environments won't
work.

The most secure and robust way is to store the data in a database.

"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:uV**************@TK2MSFTNGP05.phx.gbl...
For a website that has users logged into it using sessions, its it best
to pass data between pages in session variables or through query
strings?



Jun 23 '06 #6
That's the point of asking whats the best method of doing this, I'm trying
to get rid of query strings, I just dont know how best to handle it

"Scott M." <s-***@nospam.nospam> wrote in message
news:OB**************@TK2MSFTNGP04.phx.gbl...
And what if someone hacks your querystring by forcing different data into
it?
"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:u%****************@TK2MSFTNGP05.phx.gbl...
well for example I need to pass this set of information from page to page
which may different pages may change the information..

Folder (path on a hierachy of data currently on, string under 200 chars)
MessageID (ID of node in the folder, Int64)
ActionGUID (Unique ID of last action performed)

besides that, not much else will be there...

"Scott M." <s-***@nospam.nospam> wrote in message
news:Ou**************@TK2MSFTNGP05.phx.gbl...
It depends on what data you are passing, how much data you are passing
and how that data will be used.

If the data needs to be secured or there will be more than 1K of data,
then QueryStrings are out. On the other hand, sessions (if not used
right) can be costly to the server and in web farm environments won't
work.

The most secure and robust way is to store the data in a database.

"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:uV**************@TK2MSFTNGP05.phx.gbl...
For a website that has users logged into it using sessions, its it best
to pass data between pages in session variables or through query
strings?



Jun 23 '06 #7
Well, if you see my first response, I mentioned that if security is an
issue, QueryStrings are out.
"Scott M." <s-***@nospam.nospam> wrote in message
news:OB**************@TK2MSFTNGP04.phx.gbl...
And what if someone hacks your querystring by forcing different data into
it?
"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:u%****************@TK2MSFTNGP05.phx.gbl...
well for example I need to pass this set of information from page to page
which may different pages may change the information..

Folder (path on a hierachy of data currently on, string under 200 chars)
MessageID (ID of node in the folder, Int64)
ActionGUID (Unique ID of last action performed)

besides that, not much else will be there...

"Scott M." <s-***@nospam.nospam> wrote in message
news:Ou**************@TK2MSFTNGP05.phx.gbl...
It depends on what data you are passing, how much data you are passing
and how that data will be used.

If the data needs to be secured or there will be more than 1K of data,
then QueryStrings are out. On the other hand, sessions (if not used
right) can be costly to the server and in web farm environments won't
work.

The most secure and robust way is to store the data in a database.

"Smokey Grindle" <no****@dontspamme.com> wrote in message
news:uV**************@TK2MSFTNGP05.phx.gbl...
For a website that has users logged into it using sessions, its it best
to pass data between pages in session variables or through query
strings?



Jun 23 '06 #8

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

Similar topics

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:...
1
by: Kevin Lyons | last post by:
Hello, I am trying to get all of my form elements passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html to the following URL:...
3
by: Simon Harvey | last post by:
Hi, In my application I get lots of different sorts of information from databases. As such, a lot of information is stored in DataSets and DataTable objects. Up until now, I have been passing...
4
by: Gibs | last post by:
Hi I have two aspx pages in a frame and in the top page i am creating the controls dynamically and putting in a place holder. I have a hyperlink in this page to populate the data in the bottom...
5
by: Rod | last post by:
I've written 2 ASP.NET applications (I've worked on one with a team and another by myself). In my ASP.NET pages, when saving data to a backend database I've done it by using the click event of a...
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: Roy | last post by:
Hey all, Is it possible to pass session variables between pages in separate projects? For example: inetpub\thisproject\blah.aspx has a session variable and response.redirects the user to...
10
nathj
by: nathj | last post by:
Hi, Part of one of my current projects is to provide an application form. This form needs to get quite a bit of data, so rather than have one really long form on one page I have split the data...
3
by: dbuchanan | last post by:
newbie question What are the various ways that data can be passed between pages. For example; How is data about the logged in user passed to subsequent pages Thank you, Doug
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.