如何将页面重定向到URI(然后打开/下载文件) [英] How to redirect a page to a URI (which then opens/downloads the file)
问题描述
大家好,
我正在开发一个包含图像按钮的Sharepoint 2010 WebPart。
当Imagebutton时单击,页面重定向到指向excel文件的URI,文件下载。
(在服务器上,我可以访问excel文件,但每当我访问 客户端计算机上的页面,只要我点击图片按钮就会继续加载)
我已经完全用尽了一些东西。
我们非常感谢您的帮助。
你没有提到,你的下载文件是哪种方式。
从服务器下载文件时它可以正常工作。但是,如果您从客户端机器下载相同的过程不会工作。你应该使用WebClient下载文件。
关注链接: http://www.csharp-examples.net/download-files/
Hi all ,
I'm working on a Sharepoint 2010 WebPart which contains an Imagebutton.
When the Imagebutton is clicked, the page redirects to a URI pointing to an excel file,and the file gets downloaded.
(on the server , I am able to access the excel file, but whenever i access the page on a client computer it just keeps loading once i've clicked the imagebutton)
I've completely run out of things to try.
You're help will be greatly appreciated.
Hi,
you didn't mention that, in which way your downloading file.
it works fine when you download file from the server. but , if your downloading from client machine same process wont work. you should to download file using WebClient.
follow link : http://www.csharp-examples.net/download-files/
这篇关于如何将页面重定向到URI(然后打开/下载文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!