Dollar sign and/or Dash breaking Razor's parser
- by justSteve
the end-result i'm trying to render:
<input type="radio" name="options" id="options_1" />$1 - A Not Very Expensive Chocolate
<input type="radio" name="options" id="options_2" />$10 - A Kinda Expensive Chocolate
<input type="radio" name="options" id="options_3" />$100 - A Really Expensive Chocolate
From this code:
@foreach (var o in Model.Options){
<input type="radio" name="options" id=@("options_" + @o.ID) />[email protected] - @o.Label
}
If i drop both the '$' and the '-' from what should be plain old text - stuff works. Adding either resulted in compiler warnings and runtime errors. I've tried the explicit syntax as described here but haven't found the right combination yet.