By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,850 Members | 967 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,850 IT Pros & Developers. It's quick & easy.

Help Needed: Passing variables securely to other ASPX pages

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.