0

I want to reference a css and js bundle in html page defined in my global.asax.cs

Global.asax.cs

System.Web.Optimization.BundleTable.Bundles.Add(
                new StyleBundle("~/StyleSheets/kendo/css")
                .Include("~/StyleSheets/kendo/kendo.common.min.css")
                .Include("~/StyleSheets/kendo/kendo.default.min.css")
                );



var KendoForJquery = new ScriptBundle("~/bundles/kendo_jquery_script")
                .Include("~/_scripts/kendo/jquery.min.js")
                .Include("~/_scripts/kendo/kendo.all.min.js");
System.Web.Optimization.BundleTable.Bundles.Add(KendoForJquery);

In MVC Page , i refer bundles like this

@Scripts.Render("~/StyleSheets/kendo/css")

But i want to refer above two bundles in html, how i can do it ?

Bokambo
  • 4,204
  • 27
  • 79
  • 130
  • something related found here using webpack > https://stackoverflow.com/questions/46866228/how-to-bundle-html-js-and-css-in-one-html-file-with-webpack/46875379#46875379 – mabiyan Jun 23 '21 at 18:16
  • I think you meant to have Styles.Render in your above example of use. Are you trying to access the stylesheets/scripts from js or something? What kind of reference are you trying to get? A reference to the url of the sheet/script? – hijinxbassist Jun 23 '21 at 18:51
  • I have one html page , i want to reference css and js bundles defined in global.asax.cs – Bokambo Jun 23 '21 at 19:37

0 Answers0