string path = Request.ServerVariables["SCRIPT_NAME"]; //获取URL地址 string[] arr_path = path.Split("/".ToCharArray()); Response.Write(arr_path[arr_path.Length - 1]);