This question is locked. New answers and comments are not allowed.
Hello,
I have a simple MVC site, with this code in the _Layout.cshtml:
@using Telerik.Web.UI
@(Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group
.Add("telerik.examples.css")
.Add("telerik.common.css")
.Add("telerik." + Html.GetCurrentTheme() + ".css")
.Add("telerik.rtl.css")
.Combined(true)
.Compress(true))
)
And this is a View where I need to use the calendar control:
<div class="clearfix grpelem" id="u392-4"><!-- content -->
@(Html.Telerik().DatePicker()
.Name("minDate")
.Value((DateTime)ViewData["minDate"])
)
</div>
I have already read tons of posts with similar an issues and after many updates to my files my global config looks like:
<configSections>
<sectionGroup name="telerik">
<section name="webAssets" type="Telerik.Web.Configuration.WebAssetConfigurationSection, Telerik.Web" requirePermission="false"/>
</sectionGroup>
</configSections>
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages"/>
<add namespace="Telerik.Web.UI" />
</namespaces>
</pages>
And the pages config looks like:
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="Telerik.Web" />
<add namespace="Telerik.Web.UI" />
</namespaces>
</pages>
</system.web.webPages.razor>
This is the error:
After spending many hours reading many telerik posts I concluded that all questions are related to older controls versions than mine. My version is: Telerik_Extensions_for_ASPNET_MVC_2012_1_419_Commercial.msi, so namespaces changed ("Telerik.Web.Mvc.UI" does not exist) and I edited my updates according to that.
Thank you,
I have a simple MVC site, with this code in the _Layout.cshtml:
@using Telerik.Web.UI
@(Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group
.Add("telerik.examples.css")
.Add("telerik.common.css")
.Add("telerik." + Html.GetCurrentTheme() + ".css")
.Add("telerik.rtl.css")
.Combined(true)
.Compress(true))
)
And this is a View where I need to use the calendar control:
<div class="clearfix grpelem" id="u392-4"><!-- content -->
@(Html.Telerik().DatePicker()
.Name("minDate")
.Value((DateTime)ViewData["minDate"])
)
</div>
I have already read tons of posts with similar an issues and after many updates to my files my global config looks like:
<configSections>
<sectionGroup name="telerik">
<section name="webAssets" type="Telerik.Web.Configuration.WebAssetConfigurationSection, Telerik.Web" requirePermission="false"/>
</sectionGroup>
</configSections>
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages"/>
<add namespace="Telerik.Web.UI" />
</namespaces>
</pages>
And the pages config looks like:
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="Telerik.Web" />
<add namespace="Telerik.Web.UI" />
</namespaces>
</pages>
</system.web.webPages.razor>
This is the error:
Line 17: @using Telerik.Web.UI Line 18: @(Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group Line 19: .Add("telerik.examples.css") Line 20: .Add("telerik.common.css")
After spending many hours reading many telerik posts I concluded that all questions are related to older controls versions than mine. My version is: Telerik_Extensions_for_ASPNET_MVC_2012_1_419_Commercial.msi, so namespaces changed ("Telerik.Web.Mvc.UI" does not exist) and I edited my updates according to that.
Thank you,