#region 获取页面地址
        
/// <summary>
        
/// 获取页面地址
        
/// </summary>
        
/// <returns></returns>
        public static string GetUrl()
        {
            
//  2009年12月15日 11:45:24
            
//  B哥 kuibono@163.com
            string strTemp = "";
            
if (System.Web.HttpContext.Current.Request.ServerVariables["HTTPS"== "off")
            {
                strTemp 
= "http://";
            }
            
else
            {
                strTemp 
= "https://";
            }

            strTemp 
= strTemp + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"];

            
if (System.Web.HttpContext.Current.Request.ServerVariables["SERVER_PORT"!= "80")
            {
                strTemp 
= strTemp + ":" + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_PORT"];
            }

            strTemp 
= strTemp + System.Web.HttpContext.Current.Request.ServerVariables["URL"];

            
if (System.Web.HttpContext.Current.Request.QueryString.AllKeys.Length>0)
            {
                strTemp 
= strTemp + "?" + System.Web.HttpContext.Current.Request.QueryString;
            }

            
return strTemp;
        }
        
string myurl = GetUrl(); 
        
#endregion

 

posted on 2009-12-15 11:47  kuibono  阅读(1387)  评论(0编辑  收藏  举报

爱造人 | 快播影视