This question is locked. New answers and comments are not allowed.
I cannot seem to get my View in my MVC3 app to recognize @Html.Telerik().Grid.
I've been reading through several similar posts on a couple of different sites, however, none of the fixes recommended solved my problem.
One item of note is that Intellisense seems to work fine in my shared/_Layout.cshtml page, but in my controller/index.cshtml, it does not.
Error 6 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.IEnumerable<MarketingWebsiteTools.ViewModels.CalloutToProductViewModel>>' does not contain a definition for 'Telerik' and no extension method 'Telerik' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.IEnumerable<MarketingWebsiteTools.ViewModels.CalloutToProductViewModel>>' could be found (are you missing a using directive or an assembly reference?)
Thanks
I've been reading through several similar posts on a couple of different sites, however, none of the fixes recommended solved my problem.
One item of note is that Intellisense seems to work fine in my shared/_Layout.cshtml page, but in my controller/index.cshtml, it does not.
Error 6 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.IEnumerable<MarketingWebsiteTools.ViewModels.CalloutToProductViewModel>>' does not contain a definition for 'Telerik' and no extension method 'Telerik' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.IEnumerable<MarketingWebsiteTools.ViewModels.CalloutToProductViewModel>>' could be found (are you missing a using directive or an assembly reference?)
Thanks
7 Answers, 1 is accepted
0

Dadv
Top achievements
Rank 1
answered on 04 Apr 2012, 01:32 PM
Do you try to add on the first line of your razor control this :
@using Telerik.Web.Mvc.UI
@using Telerik.Web.Mvc.UI
0

Douglas
Top achievements
Rank 1
answered on 04 Apr 2012, 01:53 PM
yes it is there.
Last night I just attempted to create a new telerik MVC3 razor app from scratch to see if that worked.
Steps:
Server Error in '/' Application.
Compiler Error Message: CS0246: The type or namespace name 'Telerik' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Source File: c:\development\TelerikWebMarketingTools\TelerikWebMarketingTools\web.config Line: 65
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
Last night I just attempted to create a new telerik MVC3 razor app from scratch to see if that worked.
Steps:
-Telerik Menu Item->MVC UI Extensions->Create New Telerik Project
-Choose C# Telerik MVC 3 Web App (Razor)
-Went through the series of wizard steps.
-The Project was created.
-When I clicked RUN I received this error:
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: CS0246: The type or namespace name 'Telerik' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
|
Source File: c:\development\TelerikWebMarketingTools\TelerikWebMarketingTools\web.config Line: 65
Show Detailed Compiler Output:
Show Complete Compilation Source:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
0

Dadv
Top achievements
Rank 1
answered on 04 Apr 2012, 02:21 PM
Try to use the NuGet Package, sometime it's better to have the last version (use "TelerikMvc" in the search field)
This will replace all the scripts/dlls/contents with the last open source version.
It will add the references too
This will replace all the scripts/dlls/contents with the last open source version.
It will add the references too
0

Douglas
Top achievements
Rank 1
answered on 04 Apr 2012, 02:33 PM
that did it!
thanks!
doug
thanks!
doug
0
Accepted

Dadv
Top achievements
Rank 1
answered on 04 Apr 2012, 02:35 PM
Don't forget to mark as answer
0

Sonny
Top achievements
Rank 1
answered on 24 Sep 2012, 05:14 AM
I installed the latest version of (TelerikMvcExtensions 2012.2.607) MVC Extensions using (
http://blogs.telerik.com/blogs/posts/12-03-08/using-the-telerik-extensions-in-asp-net-mvc4-today---a-first-look.aspx
The problem is that I do not get the intellisense for the Telerik object (@Html.Telerik) in my C# project, but I do get it in a VB.net MVC3 project following the steps above. I even tried this in VS-2012 RTM using MVC3 and MVC4 and couldn't get it to work in C#, but worked fine in Vb.net. I even tired earlier version of the MVC Extensions from Nuget (TelerikMvcExtensions 2011.3.1115) and failed to get it to work in C#.
I need help on this one.
Thanks
Install-Package TelerikMvcExtensions
) in my MVC3 C# Razor VS-2010 project, then I followed all the instructions in the following link to make sure I have all the correct configurations:http://blogs.telerik.com/blogs/posts/12-03-08/using-the-telerik-extensions-in-asp-net-mvc4-today---a-first-look.aspx
The problem is that I do not get the intellisense for the Telerik object (@Html.Telerik) in my C# project, but I do get it in a VB.net MVC3 project following the steps above. I even tried this in VS-2012 RTM using MVC3 and MVC4 and couldn't get it to work in C#, but worked fine in Vb.net. I even tired earlier version of the MVC Extensions from Nuget (TelerikMvcExtensions 2011.3.1115) and failed to get it to work in C#.
I need help on this one.
Thanks
0

Sonny
Top achievements
Rank 1
answered on 24 Sep 2012, 05:33 AM
Found the solution. All I had to do was to install this.
http://visualstudiogallery.msdn.microsoft.com/d3399c97-2ed2-4114-90f5-5271c803136d
http://visualstudiogallery.msdn.microsoft.com/d3399c97-2ed2-4114-90f5-5271c803136d