This is a migrated thread and some comments may be shown as answers.
Helper cannot be null problem
5 Answers 92 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jeff Kay
Top achievements
Rank 1
Jeff Kay asked on 08 Apr 2010, 04:47 PM
Firstly, I am very new to this....

I have created an MVC 2 application and am trying to get started using Telerik Extensions. If I follow the installation instructions and make a small test project, I can successfully run the Panel Bar example with no worries at all.

If I then try to integrate the extensions into my existing MVC 2 app, then I can't get past an exception that is thrown at the registration of the stylesheets OR if I take that out, then the same exception is thrown at the ScriptRegistrar() entry at the end of my Site.Master.

The full error text is: "helper" cannot be null
                                Parameter name: helper

As I said before, I am very new to .NET programming, so may have a major gap in my knowledge, but I don't understand this problem.

Any help would be gratefully appreciated.

Jeff Kay

5 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 09 Apr 2010, 06:58 AM
Hello Jeff Kay,

Make sure you are using the MVC2 build of Telerik.Web.Mvc.dll. Its assembly version must end with 235 e.g. 2010.1.309.235.

All the best,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Jeff Kay
Top achievements
Rank 1
answered on 09 Apr 2010, 09:50 AM
Thanks for the quick response, I have checked the version and it is the correct dll for MVC2 (2010.1.309.235).

I guess that there must something else in my project that is upsetting the applecart?

Jeff

0
Jeff Kay
Top achievements
Rank 1
answered on 09 Apr 2010, 12:25 PM
Hello again,

The problem seems to be linked to View Content Pages in that everything works fine until I add either a Web Content Form or an MVC2 View Content page.

In a skeleton project with a Site Master - everything works, I then add an MVC 2 View Content Page as follows:

<%

@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"

 

 

Inherits="System.Web.Mvc.ViewPage" %>

 

<

 

asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">

 

My Title

</

 

asp:Content>

 

<

 

asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

 

My Content

</

 

asp:Content>

 


Then I get this error:

System.ArgumentNullException was unhandled by user code
  Message="\"helper\" cannot be null.\r\nParameter name: helper"
  Source="Telerik.Web.Mvc"
  ParamName="helper"
  StackTrace:
       at Telerik.Web.Mvc.Infrastructure.Guard.IsNotNull(Object parameter, String parameterName)
       at Telerik.Web.Mvc.UI.HtmlHelperExtension.Telerik(HtmlHelper helper)
       at ASP.views_shared_site_master.__Render__control2(HtmlTextWriter __w, Control parameterContainer) in c:\Documents and Settings\Jeff\My Documents\Visual Studio 2008\Projects\MvcApplication3\MvcApplication3\Views\Shared\Site.Master:line 8
       at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
       at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
       at System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlTextWriter writer)
       at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
       at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
       at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
       at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
       at ASP.views_shared_site_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\7ffc73e1\782000d4\App_Web_eijcozf_.0.cs:line 0
       at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
       at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
       at System.Web.UI.Control.Render(HtmlTextWriter writer)
       at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
       at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
       at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
       at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
       at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
       at System.Web.UI.Page.Render(HtmlTextWriter writer)
       at System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer)
       at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
       at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
       at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  InnerException:


It must be something fundamental, maybe to do with versions of some of the other components?????

Thanks in advance for any suggestions.

Jeff.
0
richard parkins
Top achievements
Rank 1
answered on 20 May 2010, 11:50 AM
I have been looking at this issue for a few hours now.. Am experienced in MVC and even so, I had managed to browse to the aspx page instead of the [controller]/[action] which would definitely raise this error!

An easy thing to do and could save someone hours of time :)
0
TDG
Top achievements
Rank 1
answered on 17 Jan 2013, 04:07 PM
I got same issue when I use MVC3 with framwork 4.
Why I got this error certainly. I was working all fine. 
After I added one more column on the database, model, and then I got this error.

details are here.

Value cannot be null. Parameter name: item

   at System.Web.Routing.RouteCollection.SetItem(Int32 index, RouteBase item)
   at System.Collections.ObjectModel.Collection`1.set_Item(Int32 index, T value)
   at Telerik.Web.Mvc.UI.HtmlHelperExtension.Telerik[TModel](HtmlHelper`1 helper) in f:\109\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\UI\HtmlHelperExtension.cs:line 57
   at ASP.views_home_singlemedia_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in e:\TDG\Code\DotNet\WebServer\MDSWeb\MDSWeb\Views\Home\SingleMedia.ascx:line 7
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.Control.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.Page.Render(HtmlTextWriter writer)
   at System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Tags
Installer and VS Extensions
Asked by
Jeff Kay
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Jeff Kay
Top achievements
Rank 1
richard parkins
Top achievements
Rank 1
TDG
Top achievements
Rank 1
Share this question
or