473,725 Members | 2,169 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing values between pages with MasterPages

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.Fi ndControl. 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.redire ct) 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
1 2342
"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("Settin gName") = strSettingValue

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

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

Similar topics

7
1956
by: Martijn Saly | last post by:
Hi there, I've created a master page with some controls on it, a Calendar control among others. Now depending on the date(s) selected, the content page needs to be updated. In the masterpage I've created StartDate and EndDate properties, which are basically wrappers around the SelectedDates property from the Calendar control. When I select another date in the Calendar, the page updates normally, but when Page_Load for the content page...
14
2404
by: multiformity | last post by:
So I have been working on an opensource project for a while, and decided to really try to make it look better after focusing on the functionality most of this time. Up to now, I have simply used a standard ASPX page with minor modifications to it. All of my pages inherit from a "BasePage.cs" class, that handles common things like getting the user's information out of the session, determines if a page should or should not be password...
7
8726
by: xkeops | last post by:
Thinking of creating a website, most of the pages will have a general toolbar menu, a content and a footer. The content will be the only one who's gonna change but the rest (header,footer) will remain the same. I am interested to know your opinions/suggestions in finding an easy way of doing it. In asp one could have something like this:
0
1067
by: romaricr | last post by:
Hello, We are having issues with namespaces. Here is what we do: - We set a namespace for our project and pages (something like 'group.project.component.folder.subfolder.page) - We add a master page to each and every pages - When we add some controls to the page, their ID (the short one) is not recognised by Visual Studio.
6
384
by: Steve | last post by:
Playing around with Master Pages for the first time and wanted to get thoughts on the best way to use them. Do most developers use a different Master Page for each section and then combine the Pages together on the .aspx pages? Or do they use one primary Master Page that has a table with different rows/columns/cells that have their own content controls. If they combine them, how do they set the .aspx page to use multiple masters? ...
4
1858
by: Greg | last post by:
I have a complex page (with 8 complex user controls, and many other asp.net controls.) I have 2 very similiar pages to create, each page differing only from the others in one control. What is the best way to achieve this? I would guess that I have 3 alternatives. 1.) Visual and Logic inheritance. I know absolutely nothing about this in ASP.NET, and I haven't found anything that appears immediately simple ( i am in a rush to get this job...
4
1320
by: Max2006 | last post by:
Hi, Is there any technique that allows me to have a usercontrols based on MasterPages? I know that MasterPages are designed for aspx pages. I wonder that I can apply them to ascx files. Thank you, Max
8
11790
by: Mort Strom | last post by:
Right now the header of my master page contains all of the CSS styles for all of the pages that might be loaded in my ContentPlaceHolder. The problem is that my <styletag is getting too large to manage. I have 300 lines of styles in my masterpage and I don't need all of this for every page -- somehow this can't be a smart way of managing styles. How do I programmatically apply styles in my MasterPage based on the ContentPlaceHolder...
3
1123
by: Kojikabutosv | last post by:
Hi everybody, i have a master page and with tree buttons, how configure the buttons to load pages dinamically in wichone pages. Regards,
0
8888
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9176
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8097
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.