pagemethods中的响应对象 [英] Response object in pagemethods

查看:91
本文介绍了pagemethods中的响应对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii,我正在使用Response对象来显示excel导出的保存文件对话框,整个例程在PageMethod [webmethod with static]中,每件事情都运行正常,甚至Succeeded回调函数弹出一个确认对话框,但保存文件对话框没有显示。在代码中没有发现任何异常.Won''t Response使用静态方法..?

为什么不显示保存文件对话框来保存/打开.xlsx文件?







任何建议都表示赞赏。

Hii, I am using Response object to show save file dialog for excel export,the whole routine was in PageMethod [webmethod with static], every thing works fine, even the Succeeded callback function pops a confirmation dialog, but Save file dialog is not shown.Didn''t find any exception in the code.Won''t Response work with static methods..?
Why the save file dialog is not shown to save/open the .xlsx file?



any suggestion is appreciated.

推荐答案

你需要使用 HttpContext 类。



请检查问题的正确答案< a href =http://forums.asp.net/t/1728863.aspx/1?Using+the+Response+object+in+a+static+webmethod+>在静态web方法中使用Response对象? [ ^ ]。它可能会对你有所帮助。



谢谢......
You need to use HttpContext class.

Please check the correct answer to question Using the Response object in a static webmethod?[^]. It might help you.

Thanks...


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

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