NHAML Radio Button Syntax

351 Views Asked by At

Does anyone know the correct syntax for a selected radio button in NHAML?

This is my current NHAML code: %input{type="radio", name="Relocation", value="Yes"}

The help would be greatly appreciated.

Thanks!

3

There are 3 best solutions below

0
On

NHaml 2.0 Beta 1 syntax

%input{type="radio", name="Relocation", checked="true"}
0
On
%input {type="radio" name="Relocation" checked="checked" value="TrueOrWhatever"}

OR just use HtmlHelper

0
On

The latest version of NHaml (2.0 Beta 2) changes the way it handles attributes. Don't use commas:

%input{type="radio" name="Relocation" value="Yes"}