在 ASP.net C# 中添加 App_Themes 的子路径
我将使用我的 App_Themes 文件夹来运行从同一环境运行的三个独立站点,因此文件夹结构如下:
- App_Themes/SiteUK/Default
- App_Themes/SiteUS/Default
- App_Themes/SiteAU/Default
每个站点目录将包含各种主题 (衣服、鞋子等)。如何配置/定义主目录(即 SiteUK)。 IIS 对此不起作用。这是我现在的代码,在将其移动到子目录之前,它正在工作:
private void SetPageTheme(string categoryName)
{
switch (categoryName)
{
case "Clothes":
case "Shoes":
Page.Theme = categoryName;
break;
default:
Page.Theme = "Default";
break;
}
}
任何帮助都将是令人惊叹的网络天才。
I am going to be using my App_Themes folder for three separate sites running from the same environment, so will have a folder structure like:
- App_Themes/SiteUK/Default
- App_Themes/SiteUS/Default
- App_Themes/SiteAU/Default
Each site directory will contain various themes (Clothes, Shoes etc). How can configure / define a leading directory (i.e SiteUK). IIS wont work for this. Here's my code at the moment, before moving it into the sub directories, which is working:
private void SetPageTheme(string categoryName)
{
switch (categoryName)
{
case "Clothes":
case "Shoes":
Page.Theme = categoryName;
break;
default:
Page.Theme = "Default";
break;
}
}
Any help would be amazing web geniuses.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论