Click here to Skip to main content
15,897,519 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Problem to
generate 404 file or directory not found when click on attached file in c# but, file name having + sign e.g.PHO VAL-MS 1000DC-PV-2+V-FM.pdf


What I have tried:

i tried to open simply
HyperLink2.NavigateUrl = dy_path + dr["attachment"].ToString();
Posted
Comments
F-ES Sitecore 29-Jun-17 4:51am    
I don't understand your question at all, but I am going to guess that the issue is that in a url "+" is replaced with a space " ", so you your request for

/this+file.pdf

is translated to a request for "this file.pdf". If the file literally has a "+" in its name you will need to url encode the + in the url to something like

/this%2Bfile.pdf
Member 10584397 29-Jun-17 23:51pm    
yes right. my questions is that which you understood. If file name having + sign than not able to open its generate 404 resource not found.

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

  Print Answers RSS


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