mardi 17 décembre 2019

I have multiple checkbox and stoting checkbox name into another table in db.but when i am updating checkbox i am facing problem in mvc

enter code here                

this is my view

@Html.LabelFor(model => model.ProductColor, htmlAttributes: new { @class = "control-label col-md-3" })* @for (int i = 0; i < Model.colorlist.Count(); i++) {

                        for (int j = 0; j < Model.checklist.Count(); j++)
                        {


                            if (Model.checklist[j].ColorName.Contains(Model.colorlist[i].ColorName))
                            {

                                @Html.CheckBoxFor(model => model.checklist[j].isColorselected)


                                }



                        }

                        @Html.DisplayFor(model => model.colorlist[i].ColorName)
                        @Html.HiddenFor(model => model.colorlist[i].ColorId)
                        @Html.HiddenFor(model => model.colorlist[i].ColorName)

                    }



Aucun commentaire:

Enregistrer un commentaire