Note that there are some explanatory texts on larger screens.

plurals
  1. POasp.net mvc4 RadioButtonList not select multiple radiobutton
    text
    copied!<p>I'm working with ASP.net MVC4 with razor and javascript In this image I can't select multiple radio, when I select an option the other option selected remains clean and not selected. <img src="https://i.stack.imgur.com/g2PMO.png" alt="enter image description here"></p> <p>and this is my code:</p> <pre><code> @foreach (var item in ViewBag.DatosInfVehiFE){ &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;@item.cprp_descripcion&lt;/td&gt; &lt;td&gt;@item.piv_cantidad&lt;/td&gt; &lt;td&gt;@item.cprp_idpartepre&lt;/td&gt; &lt;td&gt; @Html.RadioButtonFor(m =&gt; m.parestadopieza, Crd.Web.Areas.Inspeccion.Models.v_PreInformacionVehi.Estado.Bueno, new { id = string.Format("B_{0}", item.cprp_idpartepre.ToString()) }) Bueno @Html.RadioButtonFor(m =&gt; m.parestadopieza, Crd.Web.Areas.Inspeccion.Models.v_PreInformacionVehi.Estado.Regular, new { id = string.Format("R_{0}", item.cprp_idpartepre.ToString()) }) Regular @Html.RadioButtonFor(m =&gt; m.parestadopieza, Crd.Web.Areas.Inspeccion.Models.v_PreInformacionVehi.Estado.Deficiente, new { id = string.Format("D_{0}", item.cprp_idpartepre.ToString()) }) Deficiente &lt;/td&gt; &lt;td&gt;@item.piv_observacion&lt;/td&gt; </code></pre> <p> </p> <pre><code>} </code></pre> <p>how I can select an option for each row?</p> <p>this is my controller</p> <pre><code>[HttpPost] public ActionResult InsInformacionVehiculo(string IdInspeccion) { ViewBag.IdInspeccion = IdInspeccion; List&lt;Models.v_PreInformacionVehi&gt; ListaInfVehi = InformacionVehiculo("INP0001", "", "").ToList(); List&lt;Models.v_PreInformacionVehi&gt; ListaFrontalExt = ListaInfVehi.Where(e =&gt; e.cprp_partipoiv == "E" &amp;&amp; e.cprp_parsubtipoiv == "F").ToList(); ViewBag.DatosInfVehiFE = ListaFrontalExt; return PartialView("~/Areas/Inspeccion/Views/raAcc/_DatosInfoVehiculo.cshtml"); } </code></pre> <p>Where ListaFrontaExt is this data (image) (this send for ViewBag to partialview _DatosInfoVehiculo.cshtml <img src="https://i.stack.imgur.com/TDWI4.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload