Hi I am working on MVC project I have one jquery script which used all web pages of website project. I want Set it globally can you guys help me????
1 Answer
Just put your script in _Layout.cshtml page.
In MVC it's better to use bundles for this case.
In your App_Start\BundleConfig.cs:
bundles.Add(new ScriptBundle("~/bundles/global").Include(
"~/Scripts/yourGlobalScript.js"));
In your Views\Shared\_Layout page:
@Scripts.Render("~/bundles/global")