Sam Rueby
Sam Rueby

Reputation: 6129

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 a a 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.

Upvotes: 1

Views: 251

Answers (1)

William Gross
William Gross

Reputation: 2103

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.

Upvotes: 1

Related Questions