开发者

session value lost in asp.net in c#

开发者 https://www.devze.com 2022-12-26 00:01 出处:网络
hai.. Am doing wepsite for show images from local drive using asp.net.am using session object for Transfer image path from first page to second page

hai..

Am doing wepsite for show images from local drive using asp.net.am using session object for Transfer image path from first page to second page its running nice in vs 2003 .but i converted this website to vs 2005.but session value does't pass to next page.i got null value in session object. am using inproc session mode

开发者_如何学JAVAkindly help me thanks


Your application will probably encounter an error and therefore the session will end. Afterwards a new Session is started. Accessing that value in the new value will return null.

Steps to find your error:

Create the global.asax in your Rootdirectory. Set Breakpoints for Session_OnStart, Session_OnEnd and Application_OnError and try to find where the error lies.


How you are storing the path of images. See i am doing like this and everything goes file for me.

Session["Path"] = @"D:\Images\PNEUMATIX_MR_CardiovascularHeart Cardiac Function_6\img.jpeg";

on another page i am taking like this.

Label1.Text = Session["Path"].ToString();

And i am using sessionState mode="inProc". My be you have some problem with path.


http://markmail.org/message/emd3swpsembfplis#query:+page:1+mid:dfdchaihfj7c46j7+state:results

Thanks god this post save my life! IE bugs with _ in the domain name .. they flush all session variable

0

精彩评论

暂无评论...
验证码 换一张
取 消