iam beginner to mvc and iam using mvc4.0
Iam getting this error CS0103: The name 'url' does not exist in the current context
Layout.cshtml
@url.Content("~/Content/Site.css")rel ="stylesheet" type ="text/css"/>--error on this line
rel="stylesheet" type="text/css" />
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Html.ActionLink("your logo here", "Index", "Home")
@Html.Partial("_LoginPartial")
@RenderSection("featured", required: false)
@RenderBody()
@Scripts.Render("~/bundles/jquery")
@RenderSection("scripts", required: false)
-------------------------
Index.cshtml
@model insertupdatedelete.Models.mobileda
@{
ViewBag.Title = "Index";
Layout ="~/Views/Shared/_Layout.cshtml";
}
@using (Html.BeginForm()) {
@Html.ValidationSummary(true)
}
@Html.ActionLink("Back to List", "Index")
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
@{
ViewBag.Title = "Index";
Layout ="~/Views/Shared/_Layout.cshtml";
}
Index
@using (Html.BeginForm()) {
@Html.ValidationSummary(true)
}
@Html.ActionLink("Back to List", "Index")
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
--------------------
View webconfig
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
---------------------------------
main webconfig
Vincent Maverick DuranoPosted Aug 15, 2016, 10:05 AM
Vinay SinghPosted Aug 14, 2016, 1:58 PM
Add the following setting to your MAIN web.config file's appSettings section:
From Connect: http://connect.microsoft.com/VisualStudio/feedback/details/732597/visual-studio-11-beta-razor-intellisense-not-working