count values in between slashes in vb.net

Discussion in 'Software Q&A' started by rajesh_verma, Mar 13, 2006.

Thread Status:
Not open for further replies.
  1. rajesh_verma

    rajesh_verma New Member

    Joined:
    Jan 30, 2006
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  2. ~Phenom~

    ~Phenom~ The No.1 Stupid

    Joined:
    May 17, 2005
    Messages:
    1,703
    Likes Received:
    5
    Trophy Points:
    0
    Location:
    CYBERYARD
    Just use the split function .
    split by "/"
     
  3. PainKiller

    PainKiller thug for life...2pac

    Joined:
    Jul 29, 2005
    Messages:
    182
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    nEw dElHi [wEsT]
    absolutely correct . split function will do it . or u can write ur own function to do this
     
Thread Status:
Not open for further replies.

Share This Page