Top "Razor-declarative-helpers" questions

Can I return a string using the @helper syntax in Razor?

I have a RazorHelpers.cshtml file in app_code which looks like: @using Molecular.AdidasCoach.Library.GlobalConstants @helper Translate(string …

string asp.net-mvc-3 razor type-conversion razor-declarative-helpers
Using @Html inside shared @helper in App_Code

I am building a very basic MVC3 site while I learn and I am having difficulty with the following declarative …

asp.net-mvc asp.net-mvc-3 razor razor-declarative-helpers
ASP.NET MVC @helper syntax vs Html Helper Extension methods

I need to create custom html helper method. As far as I know there are two ways: Use @helper razor …

c# asp.net-mvc extension-methods razor-declarative-helpers
What is the "HTML attributes" parameter?

The following sample: @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) appears to be using the second overload …

asp.net-mvc razor razor-declarative-helpers
Why is the HtmlHelper instance null in a Razor declarative @helper method?

Using MVC 3 RTM I'm getting a strange NullReferenceException: @helper TestHelperMethod() { var extra = "class=\"foo\""; <div @Html.Raw(extra)>&…

.net asp.net-mvc-3 razor razor-declarative-helpers
Using and Creating helper in Asp.net MVC4 Web Application

I am using the Asp.net mvc4 WebRole, and I found this is a Web Application , Not a Web Site. …

razor asp.net-mvc-4 azure-web-roles razor-declarative-helpers
How to fix error The type or namespace name 'Linq' does not exist in the namespace 'System'

ASP.NET MVC4 application contains Helper.chtml file in App_Code folder containing Razor helpers. After upgrading to Visual Studio …

asp.net-mvc visual-studio asp.net-mvc-4 razor razor-declarative-helpers