Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Master Page in separate assembly

I have some ASP.NET Master Pages located in one assembly. I need to use these Master Pages with my WebForm pages located in other assemblies that have a reference to the first assembly. I cannot seem to figure out a way to do this.

Is there a nice way that I can do this?

If no pretty solution exists I would also like to hear about possible hacks?

like image 952
Jacob T. Nielsen Avatar asked Feb 04 '26 21:02

Jacob T. Nielsen


2 Answers

Master Pages are based upon Usercontrols, therefore they cannot be shared across applications.

That said, Dan Wahlin has a way around that particular limitation listed on his blog.

like image 166
Stephen Wrighton Avatar answered Feb 06 '26 11:02

Stephen Wrighton


Sharing Master Pages Across IIS Applications by Dan Wahlin will give you some ideas..

Also, check this excellent article by Scott Allen. You can check the last section at the end on sharing master pages.

like image 24
Gulzar Nazim Avatar answered Feb 06 '26 13:02

Gulzar Nazim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!