Top "Razor" questions

Razor is a template language used by ASP.

Localhost not working in chrome and firefox

I am doing a web project using visual studio 2010(MVC3 Razor) and Windows 7. My default browser is IE. When I …

visual-studio-2010 asp.net-mvc-3 razor localhost
Where can I find System.Web.Helpers, System.Web.WebPages, and System.Web.Razor?

I am following this article on RazorGenerator and it say's that I must add references to: System.Web.Helpers.dll …

c# visual-studio-2010 razor razorgenerator
Multiple radio button groups in MVC 4 Razor

I need to have multiple radio button groups in my form like this: I know it's simply done by specifying …

asp.net-mvc-4 razor radio-button radio-group
Html.RenderPartial() syntax with Razor

This works, because it returns the result of partial view rendering in a string: @Html.Partial("Path/to/my/partial/…

asp.net-mvc asp.net-mvc-3 razor
Set disable attribute based on a condition for Html.TextBoxFor

I want to set disable attribute based on a condition for Html.TextBoxFor in asp.net MVC like below @Html.…

asp.net-mvc asp.net-mvc-3 razor html-helper
What, why or when it is better to choose cshtml vs aspx?

I would like to know what, why or when it is better to choose cshtml and what, why or when …

asp.net asp.net-mvc razor
MVC which submit button has been pressed

I have two buttons on my MVC form: <input name="submit" type="submit" id="submit" value="Save" /> <…

c# asp.net asp.net-mvc razor
How to add "required" attribute to mvc razor viewmodel text input editor

I have the following MVC 5 Razor HTML helper: @Html.TextBoxFor(m => m.ShortName, new { @class = "form-control", @placeholder = "short name"}) …

asp.net-mvc razor data-annotations html-helper
How to create a function in a cshtml template?

I need to create a function that is only necessary inside one cshtml file. You can think of my situation …

asp.net-mvc asp.net-mvc-3 razor