Accessing parent master page function from child master page

Rate It (1)

Last post 01-12-2007 2:22 AM by akjoshi. 2 replies.

Sort Posts:

  • Accessing parent master page function from child master page

    01-11-2007, 6:13 PM
    • Member
      55 point Member
    • Totenkopf
    • Member since 10-01-2006, 1:15 AM
    • Posts 89

    Hi,

    I'm using nested master pages for one of my websites.

     
    In the parent.master, I have a public function defined called Test(), and at the top of child.master, I have the two lines <%@ master Language="C#" MasterPageFile="parent.master" %> and
     <%@ MasterType VirtualPath="parent.master" %>  ... how do I access the Test() function in the parent.master file from the child.master code behind?

     

    Thanks in advance for any help.

     

  • Re: Accessing parent master page function from child master page

    01-11-2007, 6:59 PM
    Answer
    • Contributor
      3,803 point Contributor
    • rojay12
    • Member since 04-03-2006, 10:43 PM
    • Sacramento, CA
    • Posts 695

    this worked for me...

    Master.Test();

    Jared Roberts
    Lead Application Developer
  • Re: Accessing parent master page function from child master page

    01-12-2007, 2:22 AM
    Answer
    • Contributor
      3,634 point Contributor
    • akjoshi
    • Member since 05-06-2006, 9:23 AM
    • INDIA
    • Posts 614
    When you ask a question, remember to click "mark as answered" when you get a reply which answers your question; this ensures the right forum member gets credit for being helpful (and makes search more relevant too).
Page 1 of 1 (3 items)