Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 31, 2012 12:41 PM by sameer_khanjit
Aug 31, 2012 09:45 AM|LINK
I want to down load a word document by clicking a link in c# .I need to keep back ground image for tat link.
which is the best way to do?please help.
(download means open,save as file)
Aug 31, 2012 09:56 AM|LINK
Another way is to just have a hyperlink to the file and with the client click on the file the browser will ask them if they want to download.
you can have them right click and do a save target to download.
Aug 31, 2012 10:24 AM|LINK
Aug 31, 2012 12:41 PM|LINK
1) In your website like http://www.asp.net, create one temp virtual directory that will be like http://www.asp.net/temp
In your virtual dicrectory point to your server folder where your dicrectory resides.
Now from URL you can easily access the server document like http:asp.net/temp/newworddocument.docx
Now you can assign this document URL to your link button with target=_blank will open new browser or tab with save or open option.
2) scond way , here you can read binary of file and can write in in response(response.write) in your c#\vb.net code will also open the save and open dialoage