Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
im retrieve last value from url
example:
const string str="http://www.codeproject.com/Questions/ask.aspx"
this is constant
im my application automaticall added string or number like
http://www.codeproject.com/Questions/ask.aspxsadfsf_sdf
http://www.codeproject.com/Questions/ask.aspxskdfwer234
Now i want to get the value from url what is the new value added
result is=sadfst_sdf
result2 is=skdfwer234
like this

don't know how can i get like that if any one help me out
greatly appriciate
Thank U.
Posted
Updated 30-Nov-11 23:11pm
v2

Test this one.

C#
String test = "http://www.codeproject.com/Questions/ask.aspxsadfsf_sdf";
            test = test.Substring(test.IndexOf("aspx"));
 
Share this answer
 
string strs = last.Substring(last.LastIndexOf("http://test.com/ws/test/v10") + 28);
Console.Write(strs.ToString());
this is also working fine.
 
Share this answer
 
Comments
RaviRanjanKr 1-Dec-11 14:13pm    
A suggestion :- its not a good practice to post your feedback or comment as an answer. you can use have a question or Comment.

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