Results 1 to 4 of 4

Thread: [RESOLVED] [2005] locations in Strings

Threaded View

  1. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [2005] locations in Strings

    There are a couple of ways to do it, one is to string.split to split the string at the "/" charater and take the 2nd element of the returned array. The other option is to use string.substring... I think the 2nd option is cleaner in this case
    Code:
    Dim userName As String = yourstring.Substring(yourstring.IndexOf("/") + 1)
    For the 2nd question, you can use System.IO.Path.GetFileName("put the path here") to get the name of the folder. You then assign it to your label.text property. You can save the full path in your label.Tag property
    Last edited by stanav; Apr 12th, 2008 at 08:57 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width