Masterpage communication to content pages?

G

Guest

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!
 
C

clintonG

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top