Thursday, May 8, 2008

How to use and include a dll to ASP .NET for VS 2005

How to use and include a dll to ASP .NET for VS 2005
1. Add Reference in [Project of Solution Explorer]
   go to browser page and then select the dll file all you need

2. all dll shell copy to /bin by automatical, namespace should appear in /Bin ,
   since you Added reference.

3. at your Code behind , just simple define those namespace by [using] keyword
   and then you can new the class object of in namespace.

4. at your .aspx define Tag for that dll object as below
   <%@ Register TagPrefix="tagName" Namespace="company.pub" Assembly="ObjectName" %>
   Assembly name is one of class name in the Namespace.
   in the .aspx you can use this object by call TagPrefix name