Thursday, 22 August 2013

c# Session does't exist in current content

c# Session does't exist in current content

I want to save the userid in the session to use in the application. I gave
the following code.
But getting compilation error saying The name Session doesn't exist in the
current context. is there any library that i need to use?. Please advise.
private void button1_Click(object sender, EventArgs e)
{
Session["Username"] = user.Text;
}

No comments:

Post a Comment