Advertisement
Guest User

Untitled

a guest
Aug 1st, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. private string GetCurrentURL()
  2. {
  3. string appPath = Request.ApplicationPath.ToString();
  4. string[] strPath = Request.RawUrl.ToString().Split('/');
  5. if (strPath.Count() == 2)
  6. {
  7. return Request.RawUrl.ToString().Replace(appPath, "")
  8. }
  9. else
  10. {
  11. return Request.RawUrl.ToString().Replace(appPath, "").Substring(1));
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement