Thursday, April 24, 2008

Referencing Namespace from Web.Config

Instead of making the code in .cs file complex you can also add all your name space in web.config. Harry Potter The name space referenced from web.config file will be available to all cs or vb files in the project. Every time writing the same name space again and again increases the LOC.


<configuration>
<system.web>
<pages>
<namespaces>
<add namespace=”System.Net.Mail”/>
</namespaces>
</pages>
</system.web>
</configuration>

No comments: