62,195
社区成员
发帖
与我相关
我的任务
分享
string scriptname = HttpContext.Current.Request.ServerVariables["SCRIPT_NAME"];
if (!String.IsNullOrEmpty(scriptname))
scriptname = scriptname.Substring(scriptname.LastIndexOf("/") + 1);
scriptname = scriptname.ToLower();
string querystring = HttpContext.Current.Request.ServerVariables["QUERY_STRING"];
querystring = (querystring == "?" ? "" : querystring);
querystring = querystring.ToLower();
querystring = Regex.Replace(querystring, @"pageid=(\d+)", "") + "&pageid=[page]";
FileNameStyle = scriptname + "?" + querystring;