Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey friends i m new in MVC4 and i am confused in @style.render() i know how it work i make a class of Bundle.config in Appstart folder and add bundle and now i want to access with @style.render() in _layout.html but its not reference means its not include its give error red line show in bottom of @style.render()

thats my bundle file code:
C#
using System.Web.Optimization;

namespace UpdatedInventory.App_Start
{
    public class BundleConfig
    {
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/style.css"));

        }
    }
}

............

and thats my _layout.html
<!DOCTYPE html>

<html>
<head>
<meta name="viewport" content="width=device-width" />

<title>@ViewBag.Title</title>
</head>
<body>

@RenderBody()

</body>
</html>
..............
and plz help hope u will understand
Posted
Updated 12-Mar-15 6:20am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900