Change Homepage with Web.Config

When you create your application project, the “default.aspx” page is set as your homepage. But what if you need to set another page as homepage for your ASP application? In this article I am going to give you a step-by-step guide on how to change your application homepage with Web.ConfigOverview


As you can see there are three pages:




If we publish this site, the homepage will be “default.aspx“, because this type of files like default.aspx or index.html are predetermined in the server. Changing the homepage requires to point which then new homepage file.


Getting Started

1. Open the web.config file of your ASP application.

2. Add the following code:


3. After adding this code, the Default.aspx will be replaced by your new homepage:


As you can see the initial page is the one that we declare in the web.config, without adding any extra code.

This concludes Change Homepage with Web.Config

Looking for quality Windows Hosting? Look no further than Arvixe Web Hosting!

Happy Hosting!

Rodolfo Hernandez

Tags: , , , , , , , , , , , | Posted under ASP .NET 4.0 | RSS 2.0

Author Spotlight

Rodolfo Hernandez

I like photography and reading books. Currently working for Arvixe as Elgg Community Liaison. Elgg Security Expert Web Security Expert CEO of UDP SW Social Web

Leave a Reply

Your email address will not be published. Required fields are marked *