Click here to Skip to main content
15,906,097 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
string imagepath = @"photos\PRIUS+\5MM.jpg";
Img.ImageUrl = imagepath ;

Here I wanted set the image url, but path have + symbol. i.e folder name photos under that PRIUS+ is sub folder, 5MM.jpg is image to display.

Any help can be appreciated.

What I have tried:

I have tried allowDoubleEscaping="true" in web.config. But it opens the security whole. So not commanded. Any alternate way I can display the image?
<security>
<requestFiltering allowDoubleEscaping="true"/>


Can any one help me to fix this issue.
Posted
Updated 20-Jul-17 0:28am
Comments
Prifti Constantine 6-Jul-17 9:53am    
You want to Get only the "5MM.jpg" value from the uRL?

1 solution

You can directly use the path like,
string imagepath = @"photos\PRIUS+\5MM.jpg";

It will work. I've also tried.
 
Share this answer
 

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