here is my layout page
<!DOCTYPE html>
@using System.Web.Optimization;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="description" content="Metro, a sleek, intuitive, and powerful framework for faster and easier web development for Windows Metro Style.">
<meta name="keywords" content="HTML, CSS, JS, JavaScript, framework, metro, front-end, frontend, web development">
<meta name="author" content="">
<title></title>
@Scripts.Render("~/bundles/jquery")
@Styles.Render("~/bundles/metro-ui")
<script src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js"></script>
@Styles.Render("~/bundles/metro-ui/css")
@Styles.Render("~/bundles/css")
and so on
and here is my RazorView
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="~/Scripts/jquery-2.1.4.min.js"></script>
<script src="~/Scripts/metro.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js"></script>
<script src="~/Scripts/jquery-ui-1.10.4.custom.min.js"></script>
<link href="~/Content/metro.css" rel="stylesheet" />
<script src="~/Scripts/select2.min.js"></script>
<link href="~/Content/css/select2.min.css" rel="stylesheet" />
<link href="~/Content/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" />
<link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css" rel="stylesheet" />
<br /><br />
@using (Html.BeginForm("Search", "Home", FormMethod.Get))
{
}
and so on...
my Razor View is inherited to Layout how can i use these scripts in my Razor view i don't need to use these scripts again in my Razor View please give me some solution...?