Manually generate DLL files using the Asp.net class

Source: Internet
Author: User

Start-" Program-Microsoft Visual Studio 2005-Visual Studio Tools-Visual Studio 2005 Command Prompt
Then enter your class directory. For example, your class file is under E:/test/app_code,
Run the following command:
CSC/Target: library file. CS

File. CS is your class file.

Then you can generate a DLL file with the same name !!!

Custom server controls are divided into two types:
1. One is to use *. aspxCodeAnd *. CS code is compiled to generate DLL, and then add reference to toolbox for use.
It is generally used in webform.
2. Another method is to use only *. CS, compile the DLL, and add it to the toolbox.
It is generally used in winform.
To generate a custom control, follow these steps:
For example:
1. Drag a button from the designer to the page,
Set a fixed value for the button size, color, or text. Save the file name as a. CS.
2. CSC/R: system. dll/T: Library/out:... \ .. \ A. dll A. CS
3. Right-click the blank area in the toolbox, right-click the menu, and select "add remove item ".
Add it to the toolbox. In this way, you can drag and use it like a normal button.

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.