是否有可能运行的异步调用ASP.NET设置会话? [英] is it possible to run async call to set a session in ASP.NET?

查看:170
本文介绍了是否有可能运行的异步调用ASP.NET设置会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有ACCESS数据库运行了沉重的存储过程,并返回结果页面,结果将取决于会话变量会话[isShown]例如显示。

I have a page that access Database running a heavy stored procedure and return a result, the result will be displayed depending on a session variable Session["isShown"] for example.

我想使用Ajax调用另一个页面设置:

I would like to using Ajax to call another page to set :

 xmlhttp.open("POST", "frmCancelWfSearch.aspx", true);
 xmlhttp.send();

如何运行frmCancelWfSearch.aspx asynchrounously来设置会话[isShown]假?

how to run frmCancelWfSearch.aspx asynchrounously to set that Session["isShown"] to false?

推荐答案

实现你的服务器code在 IHttpAsyncHandler ,并落实 IRequiresSessionState 所以你必须访问会话。

Implement your server code in an IHttpAsyncHandler and also implement IRequiresSessionState so you have access to the session.

http://msdn.microsoft.com/en-us/magazine/ cc164128.aspx

这篇关于是否有可能运行的异步调用ASP.NET设置会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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