Reputation: 185
What is the advantage of adding namespace in web.config
file?
<configuration>
<system.web>
<pages>
<namespaces>
<add namespace="System.Collections" />
</namespaces>
</pages>
</system.web>
</configuration>
Upvotes: 2
Views: 2425
Reputation: 2688
Namespaces you define here are automatically imported into all pages of an application.
Upvotes: 0
Reputation: 561
This will allow to add the namespaces of the items you commonly use in your views so you don't need to add the references in each page / view when you need to use them.
Upvotes: 6