Interviews - C# Corner

Arjun Panwar
Can you change a Master Page dynamically at runtime?
By Arjun Panwar in ASP.NET on Nov 08, 2012
  • Rakesh Shinde
    Apr, 2013 23

    Yes..by this.masterpagefile=""

    • 0
  • Yogesh Sharma
    Nov, 2012 20

    protected void Page_PreInit(object sender, EventArgs e) { if (Membership.GetUser() == null) //check the user weather user is logged in or not this.Page.MasterPageFile = "~/General.master"; else this.Page.MasterPageFile = "~/myMaster.master"; }

    • 0

Download Free eBooks

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS