2

I am new to MVC, as I try to learn (while doing things in the most professional way), I am staring with Empty MVC4 template.

Speaking not only for my self I assume:

could anyone be real kind to walk through the implementation from ground zero, step by step?

So now, that I remembered reading somewhere about the technique of declaring a folder for the scripts instead of specifying each, I had to implement it my self, meaning I estimate every new thing (it's pros and cons) then I decide if I am using it, that is why I start an Empty project.

So I start to learn how to implement it correctly, and I read about the order issue and I read some more scattered information but I could not see clear instructions on where and when to put it all and which one of the examples of implementation should I use:

First where do I create this? (just place it within a .Cs file within App_Start?

//so only cause it's there it will be invoked ? (...same as windows Run ?)
public static class BundleConfig
{

    public static void RegisterBundles(BundleCollection bundles)
    {
        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                    "~/Scripts/jquery-{version}.js"));

        bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                     "~/Scripts/jquery.unobtrusive*",
                     "~/Scripts/jquery.validate*"));
    }
}

In the code above Add new sb(" --> ~/bundles < - is it a variable or physical folder

Do I need to implement the {version} parameter/variable

And last, what is the correct or top notch approach for ordering?

Where in relation to the project and to each other (bundle vs ordering) it is placed?

I have mentioned the issue of ordering so I could better understand so I could properly implement the code, I have tried to understand from such answers as @Kayees pointed out, but It's not talking on some important steps as to where to place the code within solution and as @LoneXcoder pointed out Bundle-ordering

5
  • Possible duplicate of Usage of the ASP.NET MVC4 jquery/javascript bundles Commented Feb 29, 2016 at 10:31
  • 3
    @kayess not really , as it is not covering order for instance.. Commented Feb 29, 2016 at 10:36
  • Whatever, it's a perfect too broad question and has sort of canonical dupes whose already answered like ordering, want more? Use search.. Commented Feb 29, 2016 at 11:17
  • @kayess I didn't only search but had a little research . thanks for being understanding Commented Feb 29, 2016 at 11:21
  • @kayess i have installed this :c-sharpcorner.com/UploadFile/abhikumarvatsa/… Commented Feb 29, 2016 at 12:09

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.