Develop a more flexible custom control

Source: Internet
Author: User

Many parts of the project need to upload and download files, display the file name, upload time basic information, while providing bulk deletion and download function.

For convenience, a control was made, using the Ajax effect. The design is a bit cumbersome.

Overall effect:

Attachment record Attachment List

Data display controls

1, encapsulates the basic data method, is completely the foreground method. For example, the Get,post,delete method.

2. Provides a container (DIV) for displaying data.

Two variables _title and _id are defined in the background due to the need to specify a header and container Id.

WebForm uses an MVC-like writing style on the Ascx page. <%%>

Data generation controls

Implemented through the Repeater control.

The bridge between the two controls is ashx. The data that is requested by Ajax is automatically mapped to the control by reflection.

So, when you use it, you only need to refer to the first control.

System constant adjustment, maintenance feel very tired. Why is this happening?

It should be added that the actual presentation is a little more complicated. The display is effective.

For example, a div display title, click the title to control the visibility of the div that displays the data. Data, that is, attachments, can be uploaded, downloaded, deleted. Control visibility based on permissions.

Develop a more flexible custom control

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.