Chinna Netha

Chinna Netha

  • NA
  • 282
  • 138.2k

how to add script and style in bundleconfig.cs in web forms

Jul 13 2015 11:20 PM
how to add styles and scripts in asp.net web forms
i add ting bundleconfig.cs but not working in asp.net webforms
 
bundles.Add(new ScriptBundle("~/Scripts/Customscripts").Include(
"~/Scripts/tooltrip.js",
"~/Scripts/bootstrap.js",
"~/Scripts/bootstrap.min.js",
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-{version}.min.js",
"~/Scripts/jquery-ui.js",
"~/Scripts/jquery-ui.min.js",
"~/Scripts/modernizr-{version}.js",
"~/Scripts/modernizr.custom.js"
));
 
bundles.Add(new StyleBundle("~/Content/Costomtyles").Include(
"~/Content/bootstrap-social.css",
"~/Content/bootstrap-social.less.css",
"~/Content/bootstrap.css",
"~/Content/bootstrap.min.css",
"~/Content/component.css",
"~/Content/default.css",
"~/Content/jquery-ui.css",
"~/Content/jquery-ui.min.css",
"~/Content/jquery-ui.structure.css",
"~/Content/jquery-ui.theme.css",
"~/Content/Site.css",
"~/Content/ValidationEngine.css"
));
 
in home.aspx
<asp:Content ContentPlaceHolderID="customs" runat="server">
<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/Scripts/Customscripts") %>
<%: Styles.Render("~/Content/Costomtyles") %>
</asp:PlaceHolder>
</asp:Content>
but not working plz help me
 
 
 

Answers (2)