Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Masterpage communication to content pages?

Reply
Thread Tools

Masterpage communication to content pages?

 
 
=?Utf-8?B?WmV0YXRlYzI=?=
Guest
Posts: n/a
 
      09-23-2006
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!
 
Reply With Quote
 
 
 
 
clintonG
Guest
Posts: n/a
 
      09-23-2006
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 432'17"N 882'37"W : 432'17"N 882'37"W


"Zetatec2" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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!



 
Reply With Quote
 
 
 
 
=?Utf-8?B?WmV0YXRlYzI=?=
Guest
Posts: n/a
 
      09-23-2006
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >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!

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Masterpage change its masterpage mr t ASP .Net 0 08-29-2007 10:11 PM
MasterPages - take plain form, add MasterPage. MasterPage does NOT appear when run Randy Smith ASP .Net 9 04-14-2007 09:06 AM
Masterpage Content Controls Throwing Off Content Barkster ASP .Net 5 10-30-2006 06:55 PM
MasterPage inheriting a MasterPage... is it possible? ThunderMusic ASP .Net 2 09-27-2006 07:57 PM
MasterPage -> Page -> MasterPage Code Access =?Utf-8?B?QWxleCBNYWdoZW4=?= ASP .Net 3 04-14-2006 12:34 PM



Advertisments