Avenger
Avenger

Reputation: 215

Session not maintaining in asp page from handler

In our Project, I am assigning context.Session["StackImgInsert"]="some string" in asp.net handler(.ashx page).
Now I want to make Session["StackImgInsert"]=null in ASP Page (.aspx) when I read value of Session["StackImgInsert"], then it is displaying as null.
Can anyone tell how to read the session from handler and make it null.

Upvotes: 0

Views: 281

Answers (1)

शेखर
शेखर

Reputation: 17614

You need to use this IReadOnlySessionState in your class name as follows

 public class GetFeatures : IHttpHandler, IReadOnlySessionState
 {
      context.Session["StackImgInsert"]="some string";
 }

Upvotes: 1

Related Questions