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

Passing values between pages with MasterPages

P: n/a
After a few hours of trial and error I have reached the following
conclusions, can you please tell me if I am right:

I have 2 aspx pages both with the same master page and I wish to pass
values from one to the other.

1. The postbackurl method doesn't seem to work with master pages. If I
take away the master pages it works.

2. The server.transfer method also doesn't work if I try to acess the
values via Request.Form or PreviousPage.FindControl. Again if I take
away the master pages it works.

3. My only option if I don't want to use the querystring to pass the
values (i.e. response.redirect) is to use a method which stores the
values in the server's RAM. e.g use Context.Items in conjunction with
Server.Transfer. This works with MasterPages but has the downfall of
the server's RAM now being used.

Please tell me if I am wrong or if there is no way of using cross page
posting or server.transfer for passing values from one aspx page with a
masterpage to another with the same masterpage without storing the
values in RAM?

Kind regards,

Steve.

Nov 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Steve" wrote:
I have 2 aspx pages both with the same master page and I wish to pass
values from one to the other.
Try using session variables, which should persist across page requests at a
user level:

1)
Session("SettingName") = strSettingValue

2)
strSettingValue = CStr(Session("SettingName"))
Nov 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.