如何将MVC中Request.Form获取的string类型的值转为int类型
问题描述:
string age = Request.Form["Age"];
答
如下:
return int.Parse(s);
答
int iAge = Convert.Toint32(age);
List r = tmp.Student.Where(t => t.Age== iAge).Select(t => t).ToList();