Tuesday, January 11, 2011

How to change master page on the fly in ASP.NET

In web form page, add: 
protected void Page_PreInit(object sender, EventArgs e) 

{ 

    this.Page.MasterPageFile = "~/name.master";

}

No comments:

Post a Comment