Asp.net calls the DLL file

Source: Internet
Author: User

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

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.