简体   繁体   English

如何使用EWL将自定义样式表添加到Web应用程序?

[英]How to add a custom style sheet to a web application utilizing EWL?

I'm trying to use Enterprise Web Library to quickly bring up aa web app and I want to add a custom style sheet. 我正在尝试使用Enterprise Web Library快速启动一个Web应用程序,我想添加一个自定义样式表。 I'm not sure how I can reference the style sheet within the application. 我不确定如何在应用程序中引用样式表。

Assume your style sheet is located in the web app project at Styles/MyStyles.css . 假设您的样式表位于Web应用程序项目的Styles/MyStyles.css In your Global.asax class, override EwfApp.GetStyleSheets like so: 在您的Global.asax类中,这样重写EwfApp.GetStyleSheets

protected override List<CssInfo> GetStyleSheets() {
  return new List<CssInfo> { new Styles.MyStyles.Info() };
}

This code won't compile unless you've run UpdateDependentLogic after creating your CSS file. 除非您创建CSS文件运行UpdateDependentLogic 否则不会编译此代码。 This is how the Info class gets created for your style sheet. 这是为样式表创建Info类的方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在EWL中使用ExportLogic命令来部署应用程序? - How can I use the ExportLogic command in EWL to deploy an application? 如何在Visual C#.NET Web项目中向所有Web表单添加CSS样式表引用 - How to add a CSS style sheet reference to all Web forms in a Visual C# .NET Web project 在EWL中,如何在页面的任意位置显示自定义验证内容? - In EWL, how do I show custom validation content at an arbitrary place in the page? 如何在我的应用程序中添加toast样式弹出窗口? - How to add toast style popup to my application? 如何在Winform应用程序中添加Windows 7视觉样式? - How to Add Windows 7 visual style in winform application? 样式表无法在一个网页上运行 - Style Sheet is not working in one web page 在 MVC 应用程序上更新动态 css 样式表 - Updating dynamic css style sheet on MVC application 如何在EWL中将表单字段的焦点设置为页面加载? - How to set form field focus on page load in EWL? 如何验证ASP.NET MVC Web API是否使用SSL - How to verify asp.net mvc web API is utilizing SSL 如何使用Custom AuthorizeAttribute控制器利用参数值? - How to use Custom AuthorizeAttribute for controller utilizing parameter value?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM