Greetings to all
I have a strongly typed view and for one int Rating property, I generate several radio buttons like:
@Html.RadioButtonFor(m => m.Rating, 1, new { id = "past_Rating_one"}) @Html.RadioButtonFor(m => m.Rating, 2, new { id = "past_Rating_two"}) @Html.RadioButtonFor(m => m.Rating, 3, new { id = "past_Rating_three"}) @Html.RadioButtonFor(m => m.Rating, 4, new { id = "past_Rating_four"}) @Html.RadioButtonFor(m => m.Rating, 5, new { id = "past_Rating_five"})
of course, I have labels after each switch, and jquery with images and such wonders.
All this is fine, but at the start of the page, the switch with the identifier past_Rating_one already selected. I am confused about how to launch all radio buttons without a mark when loading a page.
Of course, you can do it with jQuery, but I want to do it only with a view.
I tried this:
@Html.RadioButtonFor(m => m.Rating, 1, new { id = "past_Rating_one", selected="none"})
firebug inspection shows that as a property, but still this damn switch (first) will be stubbornly checked, so I thought I would seek help.