web sddress substring

G

Guest

Hello all,

I seem to be having one of those days today when notihng works!

I need to get 'news' (or whatever other folder name I'm at) from the
following address:

http://ww.dev.com/news/page.aspx

I've tried a number of lines using substring etc, can anyone please help?

Thanks

Jon
 
J

Jignesh Desai

Reverse the string.
use split method to split by "/"
access 2 element of an array after u split.

Eg: String.reverse.split("/").(2)

Regards,
Jignesh Desai.
 
K

Karl Seguin

Why not use what the .net framework makes available?

Check out Request.Url which returns a useful Uri instance. Specifically
the Segements property of the Uri class

karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top