473,406 Members | 2,467 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,406 software developers and data experts.

Help Needed: Passing variables securely to other ASPX pages

The problem that we are experiencing is simple:

We want to pass certain parameters from a page with several server
controls to another page.

We want to do this in a dotnet compliant manner, but we can't seem to
find a good and clean solution anywhere.

The options we looked into are as follows. Comments following the
options are why we did not want to go with them:

1-) Use a query string
- Too limited (formats it can carry etc.)
- Easy to manipulate

2-) Use Server.Transfer
- Too messy (Browser does not see the URL change, relative paths
fail)
- Certain issues associated with server.transfer

3-) Use session variables
- Take up memory and resources longer than needed
- The parameters passed are only associated with that call and not
the whole session!

4-) Dynamically write out client side script to submit form
- Not a webcontrol
- To much spaghetti code given the way that we are developing the
rest of our system

If anyone has a clean(er) solution to pass variables from a page to
the next please let me know!!!!

Thanks,

Doruk
Nov 17 '05 #1
4 1946
You could create a base page class that all your pages inherit from.
This base class could contain the "spaghetti code" involved with filling
hidden fields & such. That way the messy stuff is all tucked away.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Doruk" <do***@toz.net> wrote in message
news:22**************************@posting.google.c om...
The problem that we are experiencing is simple:

We want to pass certain parameters from a page with several server
controls to another page.

We want to do this in a dotnet compliant manner, but we can't seem to
find a good and clean solution anywhere.

The options we looked into are as follows. Comments following the
options are why we did not want to go with them:

1-) Use a query string
- Too limited (formats it can carry etc.)
- Easy to manipulate

2-) Use Server.Transfer
- Too messy (Browser does not see the URL change, relative paths
fail)
- Certain issues associated with server.transfer

3-) Use session variables
- Take up memory and resources longer than needed
- The parameters passed are only associated with that call and not
the whole session!

4-) Dynamically write out client side script to submit form
- Not a webcontrol
- To much spaghetti code given the way that we are developing the
rest of our system

If anyone has a clean(er) solution to pass variables from a page to
the next please let me know!!!!

Thanks,

Doruk

Nov 17 '05 #2
Hi Doruk,

How about using properties and passing them onto pages
using the Context object. You can create an object of that
page in the required page and then access all related
properties from the previous page.

Check out this link -

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnaspnet/html/asp01242002.asp

HTH.

Kaustav Neogy.

-----Original Message-----
The problem that we are experiencing is simple:

We want to pass certain parameters from a page with several servercontrols to another page.

We want to do this in a dotnet compliant manner, but we can't seem tofind a good and clean solution anywhere.

The options we looked into are as follows. Comments following theoptions are why we did not want to go with them:

1-) Use a query string
- Too limited (formats it can carry etc.)
- Easy to manipulate

2-) Use Server.Transfer
- Too messy (Browser does not see the URL change, relative pathsfail)
- Certain issues associated with server.transfer

3-) Use session variables
- Take up memory and resources longer than needed
- The parameters passed are only associated with that call and notthe whole session!

4-) Dynamically write out client side script to submit form - Not a webcontrol
- To much spaghetti code given the way that we are developing therest of our system

If anyone has a clean(er) solution to pass variables from a page tothe next please let me know!!!!

Thanks,

Doruk
.

Nov 17 '05 #3
look at ViewState
"Doruk" <do***@toz.net> wrote in message
news:22**************************@posting.google.c om...
The problem that we are experiencing is simple:

We want to pass certain parameters from a page with several server
controls to another page.

We want to do this in a dotnet compliant manner, but we can't seem to
find a good and clean solution anywhere.

The options we looked into are as follows. Comments following the
options are why we did not want to go with them:

1-) Use a query string
- Too limited (formats it can carry etc.)
- Easy to manipulate

2-) Use Server.Transfer
- Too messy (Browser does not see the URL change, relative paths
fail)
- Certain issues associated with server.transfer

3-) Use session variables
- Take up memory and resources longer than needed
- The parameters passed are only associated with that call and not
the whole session!

4-) Dynamically write out client side script to submit form
- Not a webcontrol
- To much spaghetti code given the way that we are developing the
rest of our system

If anyone has a clean(er) solution to pass variables from a page to
the next please let me know!!!!

Thanks,

Doruk

Nov 17 '05 #4
ViewState works only for a single page. It cannot be shared among pages.
Not a viable solution.
bruce barker wrote:
look at ViewState
"Doruk" <do***@toz.net> wrote in message
news:22**************************@posting.google.c om...
The problem that we are experiencing is simple:

We want to pass certain parameters from a page with several server
controls to another page.

We want to do this in a dotnet compliant manner, but we can't seem to
find a good and clean solution anywhere.

The options we looked into are as follows. Comments following the
options are why we did not want to go with them:

1-) Use a query string
- Too limited (formats it can carry etc.)
- Easy to manipulate

2-) Use Server.Transfer
- Too messy (Browser does not see the URL change, relative paths
fail)
- Certain issues associated with server.transfer

3-) Use session variables
- Take up memory and resources longer than needed
- The parameters passed are only associated with that call and not
the whole session!

4-) Dynamically write out client side script to submit form
- Not a webcontrol
- To much spaghetti code given the way that we are developing the
rest of our system

If anyone has a clean(er) solution to pass variables from a page to
the next please let me know!!!!

Thanks,

Doruk



Nov 17 '05 #5

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

Similar topics

6
by: Eric Johnston | last post by:
I want the visitor to enter three numbers on the page and then click a button "generate image" which will I hope cause a generated gif image to be displayed alongside on the page. This involved...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
10
by: Bob Bedford | last post by:
In the attempt to keep the URL and code quite clean, and avoid to have a very loooong url, we have used $_session for storing values trough the pages. Now, we have some clients that doesn't get...
5
by: francois | last post by:
I would like to pass information between ASPX pages. For now, my navigation are hardcoded links. In some case I do a Response.Redirect("pages.aspx") Now I wonder is this is a good way to do. ...
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...
1
by: Eric | last post by:
Hello, I am trying to come up with the best way to pass large amounts of data from page to page, namely a data table. The user needs to enter data into a form in one page and confirm it on...
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...
2
by: deshg | last post by:
Hey everyone, I am a php programmer originally and am just helping a friend of mine update their website that they paid a designer (well that's what he called himself!) to do ages ago. I have...
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: 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
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
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...
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
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.