Click here to Skip to main content
15,913,685 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dim cs = "172.16.16.21/"
          Dim lblDoca = cs + /document/dfmkdfnr.jpeg
          Response.ContentType = ContentType
          Response.AppendHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(lblDoca))
          Response.WriteFile(lblDoca)
          Response.End()


What I have tried:

actually i want to download image which is another project folder....so what path should i give
Posted
Updated 31-Mar-17 0:07am
Comments
Graeme_Grant 31-Mar-17 4:43am    
Developers sacrifice and contribute their own time for free to help fellow developers resolve difficulties. It is important that you are crystal clear about what you are experiencing with plenty of information so that your time and theirs are not wasted. The clearer the question, the better chance that you will get a favorable response in a timely manner.

Please take the time to look at these links provided before posting questions:
* Some guidelines for posting questions in the forums[^]
* Tales from the Evil Empire - Asking questions is a skill[^]

Once you are ready update the question with clear and concise details, sample code, any error messages (including inner exception details), etc, please click on Improve question to add more info to the question.
F-ES Sitecore 31-Mar-17 5:25am    
You give the right path as it is found on the website it is deployed to. Don't think about projects, a project is something that only exists in the IDE, the concept of "project" disappears when your site is published and running under IIS.
Member 12300036 31-Mar-17 6:32am    
but its not download the image
F-ES Sitecore 31-Mar-17 7:08am    
Then the path is wrong. We don't have access to your system, or know where your files are.
Member 12300036 3-Apr-17 5:28am    
actually the image i want to download in another server folder...wat path should be created to download another server image

1 solution

C#
WebClient webClient = new WebClient();
webClient.DownloadFile(fromPath, saveImgPath);


may it help you

regards,
Ketan
 
Share this answer
 
Comments
Member 12300036 31-Mar-17 6:35am    
it is for download image?
kp564 31-Mar-17 7:03am    
yes, but assure that path is phisycal path
Member 12300036 2-Apr-17 23:22pm    
ya its physical path..but not working
kp564 3-Apr-17 4:35am    
then you can go for webservice
kp564 31-Mar-17 9:04am    
if it solve your problem then please do accept it as answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900