Click here to Skip to main content
15,900,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I'm new with asp.net and am just wondering if its possible for a Content Place Holder to have 3 Master page

There are 3 different user that have same functionality "Edit/Update User", but have different Master Page

1. Admin
2. Helpdesk
3. Main User

Thank :)
Posted

1 solution

You mean conditionally masterpages will be be loaded for the page ?? yes it is possible if you bind the master page programatically.

Start by opening YourPage.aspx.cs, the code-behind class file for your site's homepage. Add an event handler for the page's PreInit.

C#
protected void Page_PreInit(object sender, EventArgs e) 
{
 this.MasterPageFile = "~/Site.master"; 
}
 
Share this answer
 
Comments
iMaker.ph 4-Sep-13 0:59am    
hmm something like that. :)
Thanks this was a big help for me :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900