This is a migrated thread and some comments may be shown as answers.

[Solved] ASP.NET MVC 3 RC2 + Telerik ASP.NET MVC Q3 Error on ScriptRegistrar

0 Answers 141 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Yury
Top achievements
Rank 1
Yury asked on 14 Dec 2010, 09:53 AM
Hello all,
After installation of ASP.NET MVC3 RC 2 and using Razor I've got a following error on ScriptRegistrar() :

"id" cannot be null or empty.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: "id" cannot be null or empty.
Source Error:

Line 48:  @Html.Telerik().ScriptRegistrar()
Line 49: </body>
Line 50: </html>


Source File: d:\Projects\Frp.Web\Frp.Web\Views\Shared\_Layout.cshtml    Line: 48

Stack Trace:

[ArgumentException: "id" cannot be null or empty.]
   Telerik.Web.Mvc.Infrastructure.Guard.IsNotNullOrEmpty(String parameter, String parameterName) +166
   Telerik.Web.Mvc.UI.ClientSideObjectWriter..ctor(String id, String type, TextWriter textWriter) +47
   Telerik.Web.Mvc.UI.ClientSideObjectWriterFactory.Create(String id, String type, TextWriter textWriter) +56
   Telerik.Web.Mvc.UI.Calendar.WriteInitializationScript(TextWriter writer) +74
   Telerik.Web.Mvc.UI.ScriptRegistrar.WriteScriptStatements(TextWriter writer) +1228
   Telerik.Web.Mvc.UI.ScriptRegistrar.Write(TextWriter writer) +49
   Telerik.Web.Mvc.UI.ScriptRegistrar.ToHtmlString() +97
   Telerik.Web.Mvc.UI.ScriptRegistrarBuilder.ToHtmlString() +36
   Telerik.Web.Mvc.{Dynamic}.ScriptRegistrarBuilder.IHtmlString.ToHtmlString() +31
   System.Web.HttpUtility.HtmlEncode(Object value) +38
  

 The cause in the line    @Html.Telerik().ScriptRegistrar()

To fix this I've used     @{Html.Telerik().ScriptRegistrar();}

In ASP.NET MVC3 RC1 it was possible to write: @Html.Telerik().ScriptRegistrar()

Tags
General Discussions
Asked by
Yury
Top achievements
Rank 1
Share this question
or