This project is read-only.

calling function in personal .js file - compiler error using @Html.RegisterScript("Hello.js")

Topics: General, Troubleshooting
Aug 22, 2012 at 9:33 PM

16:25] <tsaltd> I've been xchanging tweets with @Belroy re: a problem I'm having calling function in new .js file I have put in \scripts directory ... anyone here checked it out .... hashtag #orchardcms
[16:26] <tsaltd> wondering which forum to post it in ... surprised there is no doc on problem I am having
[16:28] <tsaltd> in my shape -  @Html.RegisterScript("Hello.js")

[16:28] <tsaltd> get compiler error CS1061: 'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'RegisterScript' and no extension method 'RegisterScript' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?)  

Aug 25, 2012 at 3:35 AM

There's no Html.RegisterScript method in Orchard views. Instead, you can use Script.Include().