- This feature is applicable for .Net 3.5, 4.0, 4.5 or above frameworks.
- Go to your web.config file and add below code.
Single Default Page
<system.webServer>
<defaultDocument enabled="true">
<defaultDocument enabled="true">
<files>
<clear/>
<add value="Home.aspx"/>
</files>
</defaultDocument>
</system.webServer>
</system.webServer>
Multiple Default Pages
- Here if the Home.aspx page is missing the 2nd page i.e. Contact.aspx will become the Default page.
<system.webServer>
<defaultDocument enabled="true">
<files>
<clear/>
<add value="Home.aspx"/>
<add value="Contact.aspx"/>
</files>
</defaultDocument>
</system.webServer>
No comments:
Post a Comment