如何在不同的浏览器中处理会话值 [英] how to handle session value in different browser

查看:89
本文介绍了如何在不同的浏览器中处理会话值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请一些人告诉我如何在不同的浏览器中处理会话值,就像每个会话在同一个浏览器中是正确的,从我传递的会话ID就像在chrome中一样正确但我在互联网浏览器中复制了传递的id url的url然后它在会话值中显示null reffernce。就像这个链接在chrome中正确打开



[ ^ ]

但在Internet Explorer会话对象中显示为null值已经显示。

i处理会话但在不同的浏览器中它没有打开。

Pls some one tell that how to handle session values in different browser, like every session is correct in same browser where from i passed id of session like in chrome is correct but i copy the url of passed id url in internet browser then it shows null reffernce in session value.like this link open correctly in chrome

[^]
but in internet explorer session object reffrence to null value has shown.
i handle he session but in different browser it is not opened.

推荐答案

我发现很难相信这会在任何浏览器中起作用
I find it difficult to believe that this would have worked in any browser
blog_title = Session["blog_title"].ToString();



您正在尝试执行 .ToString() 在检查之前if(blog_title!= null)



移动.ToString( )在if语句之后进入块。


You are attempting to do .ToString() BEFORE checking if (blog_title != null)

Move the .ToString() into the block after the if statement.


这篇关于如何在不同的浏览器中处理会话值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆