string urlName = Request.UrlReferrer.ToString();
The situations where it doesn't work:
using Response.Redirect / Server.Transfer;
clicking on a Favorite, History, or the recently-typed URLs list;
clicking on 'Home' in IE's toolbar, or an item in IE's 'Links' toolbar;
using location.href or location.replace() in client-side JScript/JavaScript/VBScript;
using HierMenus (details);
typing the URL directly in the browser and hitting Enter or clicking 'Go';
launching a clickable URL from an e-mail or MS Office document;
using Response.AddHeader or <meta http-equiv=refresh> to redirect;
loading the URL with XML
in referer veriable u will get the previous page name.
Hope this can help you.