关于asp.net中的会话 [英] about session in asp.net

查看:71
本文介绍了关于asp.net中的会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.朋友


我在与母版页相关的主页中进行会话.
它调用许多页面都工作良好,但是在此会话中,我调用的页面与该项目的任何母版页面都不相关.

第一次工作,但是当它再次页面加载时,会话到期

请告诉我的邮件任何人:-[已删除电子邮件]
在此先谢谢...

解决方案

您确实需要扩展您的问题,但是我在经验不足的开发人员的代码中经常发现的一个问题是,它们没有包装使用IsPostback检查覆盖Page_Load中的相应代码.如果要在其中创建会话变量,则每次页面加载时都可能会覆盖它们.


hi. friend


I make a session in home page which is related to master page.
It call many pages work good but this session i call a page which is not related to any master page that project.

first time it work but when it page load again then session expire

plese tell any body for my mail:- [Removed e-mail]
in Advance thanks ...

解决方案

You really need to expand your question, but one issue I often find in code from inexperienced developers is that they don''t wrap the appropriate code in the Page_Load override with a IsPostback check. If you are creating session variables in there you may be overwriting them on every page load.


这篇关于关于asp.net中的会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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