I have asp.net (web forms) website where I have different pages in supplier & customer folders. ex. localhost/supplier/index.aspx & localhost/customer/index.aspx . If someone tries to open "localhost/supplier" he would get error.Is there a way to route the links to their respective index pages?
Asked
Active
Viewed 111 times
-1
-
1duplicate question http://stackoverflow.com/questions/1913058/set-default-page-in-asp-net – rob waminal May 07 '15 at 10:34
2 Answers
0
I believe you need to set in the web config the default document
<defaultDocument enabled="true"> <!-- this line enables default documents for a directory -->
<files>
<clear/> <!-- removes the existing default document list -->
<add value="foo.htm"/> <!-- foo.htm is now the default document -->
<add value="foo.php"/> <!-- 2nd default document in search order -->
<add value="foo.aspx/> <!-- 3rd default document in search order -->
<add value="foo.cfm/> <!-- 4th default document in search order -->
</files>
</defaultDocument>
The default document is returned to the client when the browser requests a directory name (foo.com/, foo.com/somedir/), but doesn't specify a page.