Masterpage communication to content pages?

Discussion in 'ASP .Net' started by =?Utf-8?B?WmV0YXRlYzI=?=, Sep 23, 2006.

  1. 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!
    =?Utf-8?B?WmV0YXRlYzI=?=, Sep 23, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?WmV0YXRlYzI=?=

    clintonG Guest

    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" <> wrote in message
    news:...
    >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!
    clintonG, Sep 23, 2006
    #2
    1. Advertising

  3. 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" <> wrote in message
    > news:...
    > >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!

    >
    >
    >
    =?Utf-8?B?WmV0YXRlYzI=?=, Sep 23, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    MasterPage -> Page -> MasterPage Code Access

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Apr 10, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    7,869
    Steven Cheng[MSFT]
    Apr 14, 2006
  2. ThunderMusic
    Replies:
    2
    Views:
    433
    Gregory Gadow
    Sep 27, 2006
  3. Barkster
    Replies:
    5
    Views:
    410
    Barkster
    Oct 30, 2006
  4. Randy Smith
    Replies:
    9
    Views:
    410
    Mark Rae
    Apr 14, 2007
  5. mr t
    Replies:
    0
    Views:
    387
Loading...

Share This Page