473,473 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Best way to pass information between pages?

Hello all.

I want to know what would be the best way to pass information between
pages in ASP.NET? Querystring, seession variables, server transfer?
If possible if anyone can list advantages/disadvantages of each, or any
good/bad experience using one against the others.

Thanks

Nov 19 '05 #1
3 1736
hu*********@ge.com wrote:
Hello all.

I want to know what would be the best way to pass information between
pages in ASP.NET? Querystring, seession variables, server transfer?
If possible if anyone can list advantages/disadvantages of each, or any
good/bad experience using one against the others.

Thanks


MSDN has some good info:

http://msdn2.microsoft.com/library/z...us,vs.80).aspx

http://msdn2.microsoft.com/library/7...us,vs.80).aspx

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #2
Hi Craig,
Thanks for the information.
But the article doesn't mention server.transfer, for the obvious reason
that is not a way to maintain state, but it is a way to pass
information between pages. Do you or anyone else have any comments on
this?

Nov 19 '05 #3
I try to avoid Server.Transfer where possible. As far as I know using
request parameters (querystring) is more efficient (when you use
Server.Transfer ASP.NET will have to process the viewstate posted back
to the page you are transferring from).

The main argument I hear against using the querystring is that a user
can edit it, which is a potential security risk. I combat this by
including a one-way hash of the querystring as a parameter. If any
other part of the query string is changed without changing the hash
(which cannot be produced without a private key I store on the server)
I throw a SecurityException.

HTH,

-kb

Nov 19 '05 #4

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

Similar topics

131
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately...
1
by: mike | last post by:
Hello all, any advice or links to pages about how to have multiple language asp pages? For example, you have a database driven website that you want customers around the world to use. How do...
8
by: Ian Davies | last post by:
Hello I am trying to run a few INSERT queries only if the user clicks 'continue' in a <a href> The queries takes variables created from SELECT queries. I have tried to acheive this by putting The...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
4
by: Josh Harris | last post by:
Here is my question: It is common to have many pieces of business logic encapsulated within asp.net user controls. This can be found in high visibility projects such as the iBuySpy portal from...
9
by: Paul | last post by:
What I am trying to do is as follows. I have a page with 3 links,that direct the user to 3 different pages when selected after login. So all link selections will first direct the user to a login...
1
by: Annie | last post by:
hello all, I need to have access to some details in all my pages eg a Person object. what is the best way to do it? store in session object? or pass them through the QueryString or Application...
1
by: LilC | last post by:
I'm creating an application that has a standard layout for all pages. The information that is displayed in the layout will be dynamic based on the user that is logged in. Thus when a page is...
7
by: bonnie.tangyn | last post by:
Hello All Could anyone give me some suggestions on passing a long string between ASP pages? I have three asp pages - h_email content.asp, h_process_email.asp and h_preview_email.asp In the...
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
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
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,...
1
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
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,...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.