Hi,
You need to first find the postion of the character which is constant for
you, like the folder name Car.....
then you can extract the substring from the main string starting from that
position to the end of the string......e.g:-
string str = "C:\\My Documents\\My Pictures\\Car\\Sports\\mama.fla";
Response.Write(str.Remove(str.IndexOf("Car"), str.Length));
Rgds,
Bhaskar
"Eugene Anthony" <so***********@yahoo.comwrote in message
news:en**************@TK2MSFTNGP04.phx.gbl...
How do I retrieve part of a string "Car\Sports\mama.fla"
from:
"C:\My Documents\My Pictures\Car\Sports\mama.fla"
using asp.net 2.0 with c#.
Eugene Anthony
*** Sent via Developersdex http://www.developersdex.com ***