DIGIT-ARC read-only archive · snapshot: July 23, 2026

count values in between slashes in vb.net

3 posts · originally from https://geek.digit.in/community/threads/count-values-in-between-slashes-in-vb-net.25379/

R
rajesh_verma Original post #1
Mar 13, 2006 at 5:32 PM
hello to everyone,
if any of the guy who know dot net please reply the query asap.
my problem is that i wannt to extract the values from a url in between slashes.
suppose if my string is like that:
somepage.aspx/india/haryana/121/
i want to extract the values in the following way

var1=india
var2=haryana
var3=121

i dont know which function i have to use in vb.net to get this and how to use it.
unable to find on google

thanx in advance
rajesh verma
~Phenom~
Mar 13, 2006 at 8:43 PM
Just use the split function .
split by "/"
PainKiller
Mar 23, 2006 at 1:49 PM
absolutely correct . split function will do it . or u can write ur own function to do this