SPWeb web = SPContext.Current.Web;
string listname = "Not a list";
try
{
SPList list = web.GetList(HttpContext.Current.Request.RawUrl);
if (null != list)
{
listname = list.Title;
}
}
catch (System.IO.FileNotFoundException) { }
HttpContext.Current.Response.Write(listname);