string类型强转int类型 1.session int id = Convert.ToInt32(Session["userid"]); 2.传值 int id = Convert.ToInt32(Request.QueryString["ID"]);