我可以通过DLL在webproject中使用母版页吗? [英] Can I use a masterpage in a webproject via a DLL

查看:87
本文介绍了我可以通过DLL在webproject中使用母版页吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨伙计,



我正在创建具有相同CSS布局,相同主页(仅限应用程序标题更改)和default.aspx的网站。



我想将这些功能添加到Nuget包中,这样我就可以一次又一次地重复使用这些东西而不是复制浪费....



可以在ASP.NET页面中使用DLL中的主页。我只看到使用MasterPageFile属性的选项,而不是为什么连接到DLL中的母版页。



我尝试过:



很多阅读,现在希望有人有这方面的经验,如果可能的话。

解决方案

分享母版页是一个坏主意,但如果你愿意经历这种痛苦,那么你需要付出代价。

丹Wahlin - 在IIS应用程序中共享主页 [ ^ ]

Hi Folks,

I am creating websites with same css layout, same masterpage (only app title changes) and the default.aspx.

I would like to add these features to a Nuget package so I could reuse the stuff again and again in stead of copy waste....

Is is possible to use a Masterpage from a DLL in ans ASP.NET Page. I see only the option to use MasterPageFile property and not a why to connect to a masterpage in a DLL.

What I have tried:

A lot of reading and now hoping someone has experience with this and if it is possible.

解决方案

Sharing master pages is a bad idea, but if you're willing to go through the pain,
Dan Wahlin - Sharing Master Pages Across IIS Applications[^]


这篇关于我可以通过DLL在webproject中使用母版页吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆