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

Masterpage communication to content pages?

I have a site I am making. It contains one master page that has two ASP
label controls and about sixteen ASP button controls on it. Then I have
sixteen content or slave pages. The user clicks on a button and that brings
up the corrsiponding slave page in the master page. When a slave page comes
up, data is read from a SQL server database into the ASP text boxes and ASP
check boxes of each slave page. Once the controls have been populated from
the database the user is left to make any required changes they choose to the
controls on the page. When the user clicks on another button to select
another slave page, I want the data on the current slave page to be updated
to the database before the new slave page is loaded. My initial solution was
to put a HiddenField control on each of the slave pages called "PageCloser".
Then I connected a function to the "ValueChanged" event that updates the
database with the current information in the current slave page. Then the
function reads the value of PageCloser and does a Server.Transfer to the
string listed. In the OnClick event of each of the sixteen buttons on the
master page I added a function that finds the PageCloser HiddenField on the
current slave page and then sets the controls value to name of the slave page
assocated to each button. Sounds good on paper, but in practice the
ValueChanged event on the slave page is never fired. 1. Can anyone tell me
why the event never fires? 2. Can anyone tell me how I can call a function
on a slave page from a master page? There is a lot of information on the web
about accessing stuff on the master page from the slave page, but little or
no information for going the other way around. 3. I'm new at this, so if
there is a better way to get a slave page to update before a new slave page
is loaded please let me know? Thank you!
Sep 23 '06 #1
2 1895
The "slave" as you call it is called "the content page." Use the terms the
rest of us are using and you can search the web successfully. That said, go
to http://odetocode.com/ which has perhaps the best collection of blogged
items about this topic.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP 43°2'17"N 88°2'37"W : 43°2'17"N 88°2'37"W
"Zetatec2" <Ze******@discussions.microsoft.comwrote in message
news:80**********************************@microsof t.com...
>I have a site I am making. It contains one master page that has two ASP
label controls and about sixteen ASP button controls on it. Then I have
sixteen content or slave pages. The user clicks on a button and that
brings
up the corrsiponding slave page in the master page. When a slave page
comes
up, data is read from a SQL server database into the ASP text boxes and
ASP
check boxes of each slave page. Once the controls have been populated
from
the database the user is left to make any required changes they choose to
the
controls on the page. When the user clicks on another button to select
another slave page, I want the data on the current slave page to be
updated
to the database before the new slave page is loaded. My initial solution
was
to put a HiddenField control on each of the slave pages called
"PageCloser".
Then I connected a function to the "ValueChanged" event that updates the
database with the current information in the current slave page. Then the
function reads the value of PageCloser and does a Server.Transfer to the
string listed. In the OnClick event of each of the sixteen buttons on the
master page I added a function that finds the PageCloser HiddenField on
the
current slave page and then sets the controls value to name of the slave
page
assocated to each button. Sounds good on paper, but in practice the
ValueChanged event on the slave page is never fired. 1. Can anyone tell
me
why the event never fires? 2. Can anyone tell me how I can call a
function
on a slave page from a master page? There is a lot of information on the
web
about accessing stuff on the master page from the slave page, but little
or
no information for going the other way around. 3. I'm new at this, so if
there is a better way to get a slave page to update before a new slave
page
is loaded please let me know? Thank you!

Sep 23 '06 #2
Thanks! I was unsure as to the best term to use. I'll check the other site
out.

"clintonG" wrote:
The "slave" as you call it is called "the content page." Use the terms the
rest of us are using and you can search the web successfully. That said, go
to http://odetocode.com/ which has perhaps the best collection of blogged
items about this topic.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP 43°2'17"N 88°2'37"W : 43°2'17"N 88°2'37"W
"Zetatec2" <Ze******@discussions.microsoft.comwrote in message
news:80**********************************@microsof t.com...
I have a site I am making. It contains one master page that has two ASP
label controls and about sixteen ASP button controls on it. Then I have
sixteen content or slave pages. The user clicks on a button and that
brings
up the corrsiponding slave page in the master page. When a slave page
comes
up, data is read from a SQL server database into the ASP text boxes and
ASP
check boxes of each slave page. Once the controls have been populated
from
the database the user is left to make any required changes they choose to
the
controls on the page. When the user clicks on another button to select
another slave page, I want the data on the current slave page to be
updated
to the database before the new slave page is loaded. My initial solution
was
to put a HiddenField control on each of the slave pages called
"PageCloser".
Then I connected a function to the "ValueChanged" event that updates the
database with the current information in the current slave page. Then the
function reads the value of PageCloser and does a Server.Transfer to the
string listed. In the OnClick event of each of the sixteen buttons on the
master page I added a function that finds the PageCloser HiddenField on
the
current slave page and then sets the controls value to name of the slave
page
assocated to each button. Sounds good on paper, but in practice the
ValueChanged event on the slave page is never fired. 1. Can anyone tell
me
why the event never fires? 2. Can anyone tell me how I can call a
function
on a slave page from a master page? There is a lot of information on the
web
about accessing stuff on the master page from the slave page, but little
or
no information for going the other way around. 3. I'm new at this, so if
there is a better way to get a slave page to update before a new slave
page
is loaded please let me know? Thank you!


Sep 23 '06 #3

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

Similar topics

1
by: Daves | last post by:
I am using 2.0 masterpages. All content pages use some common variables, for example the DB connection string. Also some pages return links which are located in a "sublink" area in the masterpage....
5
by: Islamegy® | last post by:
In my project i have two master page which i change dynamic in runtime.. The first one with 1 ContentPanel "onepanel.master", the second with 2 contentPanel"twopanel.master".. but when i switch...
6
by: =?Utf-8?B?QmVuIFIu?= | last post by:
Hi, WHen I specify my master page in the page's @Page directive, no problems. However, when I put it ias an attribute in Web.config's page element, the designer fails. It just says "Error...
7
by: Bon | last post by:
Dear all I create a master page with image buttons on the left-hand side for navigation. When a user clicks the student button, the content (i.e. ContentPlaceholder) in masterpage will be...
2
by: Frank Milverckowitz | last post by:
Hi, New to .NET... question about Masterpages vs. using Frameset I'm using Visual Studio 2005 and notice that the generated pages are of DTD/Doctype that don't support framesets. To use...
8
by: Randy Smith | last post by:
Hi, I now need to add MasterPages to a number of existing forms, but when I add the code for MasterPage, the MasterPage does NOT appear when it runs. Any thoughts? TIA, Randy Smith
1
by: rosoft | last post by:
Hi I was looking at a instruction video form www.LearnVisualStudio.Net how to add MasterPages. But the video is for VWD 2005. In the video the guy is adding a master page and then inserts new...
4
by: Torben Laursen | last post by:
I want to change the label of a component that I have on a masterpage but I cannot get my hands on it I have a mastepage MP2 that has a button called B2 masterpage MP2 uses masterpage MP1 that has...
0
by: Tommy Jakobsen | last post by:
Hi. Is there a problem when trying to use Javascript on a nested masterpage? On my masterpage, i've got this in the <head>: <asp:ContentPlaceHolder ID="HeadContent" runat="server" /> And on...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.