Whenever I create a new Web Form on Visual Studio 2010, the default name is always \"Default.aspx\". This is a slight pain as I\'m having to change it to \"Index.aspx\" each
Although this does not cover all scenarios I have used the folowing code in the Gloabal.asax.cs to achieve this:
public class Global : System.Web.HttpApplication
{
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (Request.Url.AbsolutePath.EndsWith("/"))
{
Server.Transfer(Request.Url.AbsolutePath + "index.aspx");
}
}
}
*You must remember to remove this code when deploying the code (or wrap in DEBUG statements)!