Asp.net calls the DLL file (for example, decryptactivex. dll)
1. Put the DLL file in the bin folder and reference your DLL file first (right-click the bin folder and choose add reference)
2. Using your DLL namespace (for example, using decryptactivex ;)
3. Declare the classes in the DLL in the Code (for example, decryptclass B = new decryptclass ();)
4. Start programming (for example, string typeid = B. encrypturl (myds. Tables [0]. Rows [0] [0]. tostring (). Trim ());)
Asp.net calls the dll Control (for example:Fredck. fckeditorv2.dl)
1. Reference your DLL file first (right-click the bin folder-add reference-browse-select the DLL file to be referenced-OK );
In this case, the bin folder automatically adds the files fredck. fckeditorv2.dll and fredck. fckeditorv2.dll. Refresh.
2. Right-click the toolbox and choose items>. NET Framework components> browse> select dll File> OK;
3. The introduced control can appear in the toolbox and can be dragged directly.
Automatically generate code on the. ASPX page. The Code is as follows:
<% @ Register Assembly = "fredck. fckeditorv2" namespace = "fredck. fckeditorv2" tagprefix = "fckeditorv2" %>
<Fckeditorv2: FCKeditor id = "fckeditor1" runat = "server"> </fckeditorv2: FCKeditor>
Automatically generate code on the. Web. config page. The Code is as follows:
<Compilation DEBUG = "true">
<Assemblies>
<Add Assembly = "system. Design, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a"/> </assemblies> </compilation>
ReferenceFredck. fckeditorv2.dllExample:
Http://blog.csdn.net/zhangyj_315/archive/2008/08/20/2802368.aspx