Session variable

  • Thread starter Thread starter Alberto
  • Start date Start date
A

Alberto

How can I create a session variable in the Global.asax file?

Thank you.
 
protected void Session_Start(Object sender, EventArgs e)
{
Session["VariableName"] = "some value";
}

Protected Sub Session_Start(sender As Object, e As EventArgs)
Session("VariableName") = "some value";
End Sub

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top