string strCurrentPath; strCurrentPath = Request.Path; //make sure that it ends with aspx. This is some quick validation on the path. //This will shortcut processing for images and other files (WebResource.axd, for example). if(System.IO.Path.GetExtension(strCurrentPath).EndsWith( "aspx", true, System.Globalization.CultureInfo.InvariantCulture)) { string strCustomPath; string qString = Request.QueryString.ToString(); if(qString != string.Empty) qString = "&" + qString; strCurrentPath = strCurrentPath.ToLowerInvariant(); string appRoot = GetAppRoot(strCurrentPath); //string pageName = ""; // the URL contains this folder name //Response.Write(strCurrentPath); if(strCurrentPath.IndexOf("catalog/", StringComparison.InvariantCultureIgnoreCase) > -1) {