protected void Application_BeginRequest(object sender, EventArgs e) { String WebsiteURL = Request.Url.ToString(); String[] SplitedURL = WebsiteURL.Split('/'); String[] Temp = SplitedURL[SplitedURL.Length - 1].Split('.'); // This is for aspx page if (!WebsiteURL.Contains(".aspx") && Temp.Length == 1) { if (!string.IsNullOrEmpty(Temp[0].Trim())) Context.RewritePath(Temp[0] + ".aspx"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)