Yes , we can change master page at runtime like below code this.page.masterpagefile = "~/General.master";
Yes..by this.masterpagefile=""
protected void Page_PreInit(object sender, EventArgs e) { if (Membership.GetUser() == null) //check the user weather user is logged in or notthis.Page.MasterPageFile = "~/General.master";elsethis.Page.MasterPageFile = "~/myMaster.master"; }