问题描述
大家好,
我有一个Web应用程序,我有一个名为Download的文件夹,我有一个docx文件作为instructions.docx。
在aspx页面中,我选择了一个按钮和onlick按钮我要从其路径下载instructions.docx表示〜/ Download / instructions.docx。我尽我所能但我无法做到。
请帮我解决问题。
感谢你。
莫哈末。 Wasif
Hi All,
I have a web application and in that I have a folder named as Download and I have a docx file as instructions.docx.
In aspx page I took a button and onlick button I want to download instructions.docx from its path means "~/Download/instructions.docx" .I tried my best but I am unable to do it.
Please help me in sorting out my problem.
Thanking You.
Mohd. Wasif
推荐答案
Response.Redirect("~/Download/instructions.docx");
这很简单。单击此按钮将显示选项,基于此,您可以通过选择它来保存它位置。
It is very simple.On clicking this it will display the Options, based on this you can save it by selceting your Location.
Response.Redirect("~/Download/instructions.docx");
我是完美工作。
单击按钮时,文件下载框将显示打开,保存和取消选项..
希望这会对你有所帮助。
问候
Shweta
:玫瑰:
It is working perfectly.
When you click on the Button.. The file Download box will appear having the option of Open, Save and Cancel..
Hope this will help you.
Regards
Shweta
:rose:
这篇关于在按钮点击事件中下载asp.net中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!