Recent Posts

Tags

Community

Email Notifications

All Links

Blogs I Read

My Articles

JavaScript & CSS

Date & Time

SQL Server 2000/2005

Articles I Read

ASP.NET Free Controls

MVFP (Most Valuable Forum Posts)

Archives

Add NameSpaces in Web.Config

A new and cool feature in ASP.NET 2.0, that allows you to import default namespaces once in the Web.Config file, and then every ASPX page (Not Code-Behind) can see those imported namspaces. Here is a small code:

<?xml version="1.0"?>
<configuration>
 <system.web>
    <pages buffer="true" maintainScrollPositionOnPostBack="true">
      <namespaces>
        <add namespace ="System.Web" />
        <add namespace="System.Text"/>
      </namespaces>
    </pages>  
 </system.web>
</configuration>

Hope you liked that.

Regards

Leave a Comment

(required) 

(required) 

(optional)

(required)