Hi
I am working with checkboxes in MVC.I have a table with one clolumn as "bit" type.The following code giving me error
[HttpPost]
public string Index(IEnumerablecities)
{ if (cities.Count(x => x.Chosen) == 0)
{return "You did not select any city";
}
Chosen is a bit type here. and when i am trying to build it says "
Cannot implicitly convert type 'bool?' to 'bool'. An explicit conversion exists (are you missing a cast?)
Vinay SinghPosted Aug 24, 2016, 4:57 AM
Manas MohapatraPosted Aug 24, 2016, 3:35 AM
Ajay MalikPosted Aug 24, 2016, 12:08 AM