Web部件和提供文件下载?
问题描述:
任何人都可以提供最好的方式来提供SharePoint Web部件中的文件下载?该文件将根据请求动态创建,但我仍然需要最终显示标准页面以及正在下载的文件。
Can anyone suggest the best way to offer a file for download within a SharePoint web part? The file will be dynamically created on request, but I still need to end up with the standard page being displayed as well as the file being downloaded.
答
最后,在用户选择导出选项之后,在重新加载期间,我将iFrame动态添加到Web部件,并在该加载器中加载了处理发送的标准的.aspx页面。这涉及到必须发送Response.End
In the end I dynamically added an iFrame to the web part during the reload after the user chooses the 'Export' option, and within that loaded a standard .aspx page which handles the sending. This got around the issue of having to send a Response.End