<td><input type="checkbox" name="'chk'@item.CountryDetails.CountryId" id="'chk'@item.CountryDetails.CountryId" /></td> <td><select id="'DRP'@item.CountryDetails.CountryId" name="'DRP'@item.CountryDetails.CountryId"><option value="null">--Select time--</option> <option value="monthly">Monthly</option> <option value="yearly">Yearly</option> </select></td>
public ActionResult Index( FormCollection form) for (int i = 0; i < form.Count; i++) { { WSH.CountryId = Convert.ToInt64(form.AllKeys[i]); } if (form["'DRP'" + WSH.CountryId] != null) { WSH.WSsheduled = form["'DRP'" + WSH.CountryId].ToString(); } WSH.Scheduled = Convert.ToBoolean(form["'chk'" + WSH.CountryId]); schObj.Add(WSH); } } this my Model <pre lang="cs">public class Scheduling { public long CountryId { get; set; } public bool Scheduled { get; set; } public string WSsheduled { get; set; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)