如何将可自定义的皮肤应用到 ASP.NET 网站?
我正在编写一个 SaaS 应用程序,其 Web 前端是用 ASP.NET 编写的。我不是一个设计师,我的 ASP.NET 知识还没有达到专家水平 - 我通常专注于服务器端的东西 - 但我有一个基本的母版页和样式表,这可以解决问题。
现在,我想让我的客户能够使用自己的样式表、颜色、背景图片等自定义他们的网站,以便他们的客户登录到他们的门户 mycustomer.mydomain.com
并查看“mycustomer”选择的皮肤。
完全不知道如何做到这一点。如何?
I'm writing a SaaS application with a web front end written in ASP.NET. I'm not much of a designer, and my ASP.NET knowledge is not yet at the expert level - I usually focus on server side stuff - but I have a basic master page and style sheets, which do the trick.
Now I want to offer my customers the ability to customize their web site with their own style sheets, colors, background pictures etc. so that their customers will log onto their portal at mycustomer.mydomain.com
and see the skin that "mycustomer" has chosen.
Haven't the faintest clue how to do this. How?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您允许客户指定他自己的 CSS(作为文件或在页面中的某些文本框中)。您只需将其另存为虚拟目录中的 .css 文件,然后在
Page_Load
或Page_Init
事件期间将其添加到您的页面。您需要推送 链接 标记到页面标题像这样:
If you are allowing the customer to specify his own CSS (either as a File or in some textBox in your Page). You can simply save it as a .css file in a virtual directory and During
Page_Load
orPage_Init
Event add it to your page. You need to push a Link tag to Header of the pageLike this: