不同品牌的网站版本、资源文件?
我有一个 Web 应用程序需要修改,以便可以为不同的客户重新命名。 我使用资源文件和 #define 对 Windows 版本的应用程序做了同样的事情。 我一直在阅读 aspx/C# 的资源文件,但它们似乎仅限于本地化。 我想做一些事情,比如将所有内容放入资源文件中,然后让 Web 配置文件充当#define。
I have a web application that I need to modify so that it can be rebranded for different customers. I did the same thing with the windows version of the app using resource files and a #define. I have been reading up on resource files for aspx/C# but it seems that they are limited to localization. I'd like to do something like put everything in resource files and then have the web config file act as the #define.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据您想要重新命名的内容(颜色、徽标等),您可以使用不同的 CSS 文件来完成此操作。
Depending on what you want to rebrand (colors, logo, etc.) you could do this using different CSS files.
您当然可以使用资源文件执行您正在谈论的操作。 但是,在 .settings 文件中定义所需内容可能会更容易,因为当您这样做时,web.config 文件中的值可能会被覆盖。
如果您计划在资源文件中使用图像/其他二进制资源,.settings 并不是完美的解决方案。
希望有帮助!
You can certainly do what you are talking about with resource files. However, it might be easier to define what you need in a .settings file, because when you do that, the values can be overridden in your web.config file.
If you planned on using images/other binary resources in the resource file, .settings is not the perfect solution.
Hope that helps!
我已经使用主题根据某人的需求来更改网站的“品牌”。 http://msdn.microsoft.com/en-us/library/ykzx33wh。 .aspx.
您可以创建多个主题,将它们放入应用程序中,然后在 web.config 中指定哪个主题是默认/活动主题。
实现主题是您从一开始就应该做的事情,但您当然可以改造现有的应用程序,但工作量会根据布局和内容的复杂性而有所不同。
我不确定有多少主题(如果有)可以嵌入到程序集/资源中。
I've used Themes to change the 'branding' of a website based on what someone wants. http://msdn.microsoft.com/en-us/library/ykzx33wh.aspx.
You can create numerous themes, put them in the application and then you specify which theme is the default/active in the web.config.
Implementing Themes is something you should really do from the beginning but you can certainly retro fit an existing app, but level of effort will differ based on the complexity of the layout and content.
I'm not sure how much of the Themes (if any) can be embedded into the assembly/resource though.