access of Items[""] collection in Httphandler
HI Experts,
I am trying to access httpContext.Current.Items[] property in my httpHandler.
I am saving value in the Items[] collection in my .aspx page as:
List<ImageInfo> lstImageInfo;
lstImageInfo = SearchStore.GetPhotosSearchByTagID(lngTagID);
Context.Items["SearchPhotos"] = lstImageInfo;
Now I have to get this value in my httpHandler. I am doing it as below:
List<ImageInfo> lstImageInfoAll;
lstImageInfoAll = context.Items["SearchPhotos"] as List<ImageInfo>; or (List<ImageInfo>)context.Items["SearchPhotos"];
but here context.Items["SearchPhotos"] is returning null.
I am not able to understand it. This is happening in a single request. During debugging, in page context, context.Items["SearchPhotos"] is available but in in the httpHandler not.
Pls suggest me some solution.
Regards,
Anuj Rathi
|