UI控件在response.end()之后变得不可见

编程入门 行业动态 更新时间:2024-10-26 09:33:20
本文介绍了UI控件在response.end()之后变得不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用epplus通过响应对象下载.xlsx文件,保存对话框出现后,我的UI受到干扰,没有应用样式.我正在使用.ashx将数据下载为.xlsx文件.在下载按钮单击事件中,我正在动态创建iframe并将其样式设置为不显示任何内容,并设置一个src以运行.ashx文件,其中将package.getasbytearray中的内容发送到响应对象.我什至在此过程中打开了模式弹出窗口.在将src设置为iframe之前,我通常先将其隐藏.我的问题是样式没有应用于控件,因此将响应发送到浏览器后它们是不可见的. response.close()之后没有任何代码,只有一个finally块执行. 感谢任何建议.

I use epplus to download .xlsx files using response object, after the save dialog appears my UI gets disturbed, styles are not applied. I am using .ashx to download data as .xlsx file. In the download button click event i am dynamically creating iframe and setting its style to display none and an src to run the .ashx file where in package.getasbytearray is sent to response object.I even have modal popup opened during this process. I use to hide it before I set src to iframe. My problem is that the styles are not applied to controls , so that they were invisible after the response is sent to browser. There''s no code after response.close(), just a finally block executes. any suggestion is appreciated.

推荐答案

亲爱的 不要使用response.end(); 如果使用此功能,请像下面这样使用response.end(",false); 我建议您不要使用任何与响应有关的方法.... Dear do not use response.end(); if you use this please use like these response.end("", false); i will suggest you do not use any type of response related method....

更多推荐

UI控件在response.end()之后变得不可见

本文发布于:2023-11-08 06:49:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1568641.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:控件   UI   response

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!