using classes in an ASPX page.

  • Thread starter Thread starter francois
  • Start date Start date
F

francois

Hi all,

I need to use an helper class in my ASP.NET page. I want to use it in the
actual ASPX page and not in the code behind class.
For doing so I obviously need to import the package containing that helper
class in the ASPX page. For a normal C# class I can do the following :

using Com.MyCompany.MyNameSpace

How can I achieve the "using" feature in a ASPX page ?

Is there any specific keyword to use in the <% @Page %> directive? I did not
see any in the reference as well as I cannot see any specific directive that
would answer to my need.

Thanks for any help

Francois
 
Yes, you can add an assembly using <%@ Assembly Name="MyAssembly" %> or, as
a default, if you have in machine.config file the entry <add assembly="*" />
just put the assembly in the bin folder.
The directive <%@ Import namespace="value" %> import only the namespace.

HtH,
Andrea
 
Back
Top