Pinaki Mukherjee
Pinaki Mukherjee

Reputation: 185

What is the advantage of adding namespace in web.config file?

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

Answers (2)

Neil
Neil

Reputation: 2688

Namespaces you define here are automatically imported into all pages of an application.

Upvotes: 0

Kim R
Kim R

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

Related Questions