2

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

Shantanu Gupta
  • 20,688
  • 54
  • 182
  • 286
  • the namespaces that you have added to the config only effect the aspx markup files. @pranay is correct in suggesting those links, particularly the second one. – Daniel Dyson Jul 13 '10 at 09:08

1 Answers1

1

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

Does C# Support Project-Wide Default Namespace Imports Like VB.NET?

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Pranay Rana
  • 175,020
  • 35
  • 237
  • 263