I am trying to cast IList type to List type but I am getting error every time.
IList
List
List subProducts= Model.subproduct
Try
List subProducts = new List(Model.subproduct);
or
List subProducts = Model.subproducts as List;