jerin
jerin

Reputation: 21

session variable asp.net

How I can Clean the session variable, which hold file path while load the asp page(AddFiles.aspx) first time only?

Upvotes: 2

Views: 182

Answers (2)

NaveenBhat
NaveenBhat

Reputation: 3318

You can check for the PostBack:

if (!IsPostBack)
{
    Session["yourSessionName"] = "";
}

Upvotes: 2

Matt Evans
Matt Evans

Reputation: 7575

if (!IsPostback)
{
   Session["FilePath"] = null;
}

Upvotes: 4

Related Questions