Get FileName from URL

Results 1 to 2 of 2

Thread: Get FileName from URL

  1. #1
    Join Date
    Dec 1969

    Default Get FileName from URL

    I am using a line of code like this:<BR><BR>label1.text = Context.Request.URL.ToString()<BR><BR>This returns this:<BR><BR>http://localhost/ContentManager/Content.aspx <BR><BR>However all I reallly want to retrieve/show is Content.aspx<BR><BR>Is there a way to just retrieve the page name or do I have to parse the url?<BR><BR>Thanks,<BR><BR>Chris

  2. #2
    Join Date
    Dec 1969

    Default Just parse it.

    It&#039;s not difficult - Split() it on the "/" and then get the value in the array&#039;s UBound() index.

Posting Permissions

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