i have create a session to get a value from txtbox to put it in a label via session but I tried and I couldn't could you please help me, the session is: Session["UsrNme"] = usrnamlogintxtbx.Text;
here is the code of login page which the session created for usrnamlogintxtbx
protected void Loginbtn_Click(object sender, EventArgs e)
{
SqlConnection log = new SqlConnection(ConfigurationManager.ConnectionStrings["BeravaConnectionString"].ConnectionString);
log.Open();
SqlCommand cmd = new SqlCommand("select * from UserInfo where UID =@UID and Password=@Password", log);
cmd.Parameters.AddWithValue("@UID", usrnamlogintxtbx.Text);
cmd.Parameters.AddWithValue("@password", usrnamloginpassbx.Text);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
if(dt.Rows.Count>0)
{
Response.Redirect("User panel.aspx");
}
else
{
Clien ...
Go to the complete details ...