Pass Parameter To MasterPage ?

Discussion in 'Microsoft ASP .NET' started by googlegroup@desiboy.com, Jan 16, 2007.

  1. Guest

    How do you pass a parameter into the master pages, much like the TITLE.
    I'd like to pass SectionID from the ChildPages to the MasterPage
    (which calculates information based on SectionID)
     
    , Jan 16, 2007
    #1
    1. Advertisements

  2. A good way is to declare a public property SectionID on the master page and
    set it from content pages as this.Master.SectionID=xxx

    You will need to add a line

    <%@ MasterType virtualpath="~/MyMaster.master" %>

    into your content page.

    --
    Eliyahu Goldin,
    Software Developer & Consultant
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    <> wrote in message
    news:...
    > How do you pass a parameter into the master pages, much like the TITLE.
    > I'd like to pass SectionID from the ChildPages to the MasterPage
    > (which calculates information based on SectionID)
    >
     
    Eliyahu Goldin, Jan 16, 2007
    #2
    1. Advertisements

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. Guest

    MasterPage -> Page -> MasterPage Code Access

    Guest, Apr 10, 2006, in forum: Microsoft ASP .NET
    Replies:
    3
    Views:
    359
    Steven Cheng[MSFT]
    Apr 14, 2006
  2. ThunderMusic

    MasterPage inheriting a MasterPage... is it possible?

    ThunderMusic, Sep 26, 2006, in forum: Microsoft ASP .NET
    Replies:
    2
    Views:
    385
    Gregory Gadow
    Sep 27, 2006
  3. Randy Smith
    Replies:
    8
    Views:
    500
    Mark Rae
    Apr 14, 2007
  4. mr t

    Masterpage change its masterpage

    mr t, Aug 29, 2007, in forum: Microsoft ASP .NET
    Replies:
    0
    Views:
    257
  5. Torben Laursen
    Replies:
    4
    Views:
    428
    clintonG
    Mar 15, 2008
Loading...

Share This Page