DotNet Academy of Rajesh Rolen

Solutions by Rajesh Rolen

Set Master Page at Runtime

to set master page for any page at run time. u need to write following code


protected void Page_PreInit(object sender, EventArgs e)
{
this.MasterPageFile = "~/Business_Partner/businesspartner.Master";
}

but page should contain contentplaceholder of same name as it is in master which u are assigning it.

0 comments:

Post a Comment

About this blog

My Blog List

Advertise On This Site

Site Info

Advertise on this Site

To advertise on this site please mail on RajeshRolen@gmail.com

Information Source

About

Pages

Dot Net Academy

Advertis in This Area of Site

Powered by Blogger.

Followers

Search This Blog