Conditional Sections in a Master Page

Last post 06-30-2009 1:10 PM by XIII. 3 replies.

Sort Posts:

  • Conditional Sections in a Master Page

    06-30-2009, 12:04 PM
    • Member
      6 point Member
    • JCS8
    • Member since 06-30-2009, 3:53 PM
    • Posts 14

     Is it possible to create a master page that changes based on a web page that the user enters?  For example, i would like to have different hyperlinks for 5 pages, another set for 5 pages and so on.

    Thanks

  • Re: Conditional Sections in a Master Page

    06-30-2009, 1:01 PM
    Answer
    • All-Star
      121,972 point All-Star
    • XIII
    • Member since 06-30-2002, 11:59 PM
    • Essen, Belgium
    • Posts 13,534
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    Hi,

    well you could set the visibility of things just like on a normal page. But if the pages and their corresponding master pages are static in their relationship I would just create different master pages, or use nested master pages instead. Take a look here to learn more about that: http://www.asp.net/learn/master-pages/.

    Grz, Kris.

  • Re: Conditional Sections in a Master Page

    06-30-2009, 1:07 PM
    • Member
      6 point Member
    • JCS8
    • Member since 06-30-2009, 3:53 PM
    • Posts 14

     Hi Kris,

    thanks for the quick reply.  I was afraid of that answer!  I will just need to be a little more clever with the master pages.

    Best,

    John

  • Re: Conditional Sections in a Master Page

    06-30-2009, 1:10 PM
    • All-Star
      121,972 point All-Star
    • XIII
    • Member since 06-30-2002, 11:59 PM
    • Essen, Belgium
    • Posts 13,534
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    Hi,

    JCS8:
    I was afraid of that answer

    You don't have to fear it but just embrace the power that Master pages provide. Once you get to know them you will find that it's a great addition to your toolbox. 

    Grz, Kris.

Page 1 of 1 (4 items)