Click here to Skip to main content
15,905,679 members

Comments by Umarfarukh7 (Top 4 by date)

Umarfarukh7 28-Oct-15 3:30am View    
Correcting my earlier reply. It takes new {@Id = } argument. Please check once again what existing parameters you are using. Something, wrong with that.

Link -
https://msdn.microsoft.com/en-us/library/system.web.mvc.html.inputextensions.radiobutton.aspx#M:System.Web.Mvc.Html.InputExtensions.RadioButton(System.Web.Mvc.HtmlHelper,System.String,System.Object,System.Boolean,System.Collections.Generic.IDictionary{System.String,System.Object})
Umarfarukh7 28-Oct-15 3:20am View    
I don't think it is possible, @Html.RadioButton doesn't take @class, @id like params in new
Umarfarukh7 28-Oct-15 2:13am View    
Instead @Html.RadioButton, use @Html.RadioButtonFor(), there you don't need 4th parameter
Umarfarukh7 28-Oct-15 2:01am View    
@Mayank
Something like this -
@Html.RadioButtonFor(m => m.ID, pgName.PGName, new { @Id = "rdoPGName" })

Also, try to look at the ViewSource, it will help you out with the final html code generated.