|
asp.net判断链接是否来自外部_[Asp.Net教程] 使用的方法是: public bool IsUrl() { string str1 = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_REFERER"]; string str2 = System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"]; return ((str1 != null) && (str1.IndexOf(str2) == 7)); }
|