Puzzled_Dev
asked on
Web Forms Project - Index Page In Subfolder
Background:
Question: I was wondering if its possible to add a route to the RouteCollection in order to use the index in the sub folder as the landing page? I realize "Default Document" is an IIS setting but was wondering if there was a way to over ride this. I'm trying to avoid making the index an HTTPRedirect/JS Redirect/Response.Redirect .
www.mysite.com --> ~/Account/Index.aspx
instead of
www.mysite.com --> Index.aspx
I have tried the following with no success:
The project is an ASP.NET Web Forms site.
It is currently in the process of attempting to support a hybrid MVC model.
The new index page now resides in a subfolder.
Question: I was wondering if its possible to add a route to the RouteCollection in order to use the index in the sub folder as the landing page? I realize "Default Document" is an IIS setting but was wondering if there was a way to over ride this. I'm trying to avoid making the index an HTTPRedirect/JS Redirect/Response.Redirect
www.mysite.com --> ~/Account/Index.aspx
instead of
www.mysite.com --> Index.aspx
I have tried the following with no success:
Using System.Web.Routing
protected void Application_Start(object sender, EventArgs e) {
// routeCollection.MapPageRoute("Default", "", "~/Account/Index.aspx");
// routeCollection.Add("Default", new Route(string.Empty, new PageRouteHandler("~/Account/Index.aspx")));
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.