1. 程式人生 > >C# StringHelper,字符串操作類

C# StringHelper,字符串操作類

url ack 上一個 null fff 串操作 summary stat tex

/// <summary>
/// 返回上一個頁面的地址
/// </summary>
/// <returns>上一個頁面的地址</returns>
public static string GetUrlReferrer()
{
string retVal = null;

try
{
retVal = HttpContext.Current.Request.UrlReferrer.ToString();
}
catch{}

if (retVal == null)
return "";

return retVal;
}

C# StringHelper,字符串操作類