Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.

I have a dynamic URL (e.g. http://www.xyz.com/a?bcdefghijk) that redirects to a specific image file (http://www.xyz.com/images/1.gif OR
http://www.xyz.com/images/2.gif) under certain circumstances. Does
anyone have any ideas how I can get that final image filename ?
Thanks in advance.
Posted

1 solution

I think this Will help you.

String Pathtext = "http://www.xyz.com/images/1.gif";
String Filename = System.IO.Path.GetFileName(Pathtext);
 
Share this answer
 
Comments
anonymous1310 29-Jun-11 10:22am    
I dont have that URL ,i have a dynamic URL http://www.xyz.com/a?bcdefghijk
which redirects to the original url location which i dont know ,

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