简体   繁体   中英

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. 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 . In your Global.asax class, override EwfApp.GetStyleSheets like so:

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. This is how the Info class gets created for your style sheet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM