Posted By

krisdb on 12/23/08


Tagged

c-sharp


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


PageNameFromURL


 / Published in: C#
 

  1. private string PageNameFromURL(string url)
  2. {
  3. string output = String.Empty;
  4.  
  5. if (url.Length > 0)
  6. {
  7. String[] arrayURL = url.Split('/');
  8.  
  9. output = arrayURL[arrayURL.Length - 1].ToString();
  10. }
  11.  
  12. return output;
  13. }

Report this snippet  

You need to login to post a comment.