I need to extract the value from the current url.
For example if my url is
http://stackoverflow.com/questions/ask
I need the result stored in an array splitted with respect to “/”.
my array should contain [questions,ask]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use the Uri class:
Now look at the
uri.Segmentsproperty which represents a string array containing what you are looking for.