Silverlight combined with Web service for file uploads

Source: Internet
Author: User

Silverlight Cross-browser Support has made great strides, and with. NET development language, which makes it possible to develop rich client applications under Windows platform Silverlight should be more advantageous than flash, of course, Silverlight instead of flash should be premature, and the existing features and Flash still have a difference, But for developers, a little early contact, use, to improve the experience of site users, improve the site's interactive ability and interface is very helpful.

This article on how to use Silverlight Invoke Web service for file upload, Silverlight for interface display, user selection upload files, upload process display (progress bar), multiple file upload status display; The method provided in the Web service will receive the guest The files sent by the user are saved to a specific directory on the server and the uploaded file information is saved to the XML file. Because the uploaded files are generally used to provide download sharing to other users, the information stored in the XML file is used for the subsequent download information source, including file name, file size, upload time, download times, last download time, etc. The way XML files are accessed is through XML serialization and deserialization.

The implementation of the file Download section is easy, and subsequent releases of the Silverlight based download interface and code.

Upload page Composition:

The DataGrid control is used to display user-selected files for upload;

Button "Select Upload File" Click to open the Select File dialog box users can select multiple files;

Button "Clear", click on the contents of the DataGrid emptied;

Button "Upload", click on if the contents of the DataGrid is not empty, then start uploading all files one by one. The page is shown in the following image:

 

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.