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.
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