表Login
userID
userName
userPsw在第一页中select userID from Login where userName=001userPsw=123后
如何 Session 得到userID的值 这里不会写!!!
然后
Response.Write(第二页)
在第二页中显示除userID的值多谢大虾们了
userID
userName
userPsw在第一页中select userID from Login where userName=001userPsw=123后
如何 Session 得到userID的值 这里不会写!!!
然后
Response.Write(第二页)
在第二页中显示除userID的值多谢大虾们了
SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["SQLCONNECTIONSTRING"]);
SqlCommand myCommand = new SqlCommand("select userID from Login where userName=001 and userPsw=123", myConnection);
myConnection.Open();
string zyID=(string)myCommand.ExecuteScalar ();
myConnection.Close();
return zyID;
}////////////////////////////////////////////////////Session["strxibie"]=类名. xxx() ;
///////////////////
在第二页中直接用一个label.Text=Session["strxibie"].ToString();即可