views:

27

answers:

1

I read an article here to find the solution to my problem. But I found that it is not working for me. Whenever I tries to use any function I have to add same namespace on every page. by doing using System.Web.UI . Can I also use it for namespace that is being created along with an application. i.e. Library is an another namespace that lies in App_Code folder not as an assembly.

<pages>
      <namespaces>
        <add namespace="Library.ExceptionHandler"/>
        <add namespace="System.Web.UI"/>
      </namespaces>
</pages>

Is there any way to get them available at Code Behind Page

+1  A: 

yes but you have to change the default C# class template for that check following article

Changing the default using directives in Visual Studio

also check this

http://stackoverflow.com/questions/789239/does-c-support-project-wide-default-namespace-imports-like-vb-net

Pranay Rana