asp.net XML's network hard disk

Source: Internet
Author: User
Tags bind ftp mixed net xml range resource

Today we're going to talk about the Super Tech article,Asp.net+xml to build our own network disk

Three commonly used file transfer methods: FTP, email and "Network Neighborhood", to a certain extent to achieve the exchange of file data, but they are mainly oriented to "point-to-point" transmission, can not achieve "a piece of space, resources," the application of the demand, this based on "point to many" sharing mode needs to seek another transmission path , network hard disk is a good way to solve.

Common transmission modes and the difficulties they face in a given environment

We often have applications like this: exchanging public data files over a network for resource sharing while protecting private data from unauthorized access and operating in simple, intuitive ways. Our commonly used file transfer FTP, email mail, Network Neighborhood can achieve the transfer of files. Among them, the "FTP" function is the most powerful, but it is slightly more complicated to use, a large set of settings enough to make many people Shing, especially when the number of users is unpredictable, the user's settings for special needs will be more cumbersome; "Email" is familiar to you, but it's not only the transmission need you to connect to the Internet, And its security is a problem, in the enterprise, financial, labor and other documents to communicate in this way is not a good way; "Network Neighborhood" is another way to transfer files, by specifying a shared Web folder on this computer and placing a resource file, a range of users can access the files, However, the scope of this approach is very limited, usually in the same DNS segment address users can access the smooth, other especially the Internet users, it is difficult to use, in addition to email similar to its use is not intuitive, Many times you have to start a search on many list computers to get the resources you want!

In this view, the above three ways, although to a certain extent, to achieve the exchange of document data, but they are mainly oriented to the "point-to-point" transmission (you can only passively wait for each other to place data and can not actively "visual" to obtain), can not achieve "a space, resources are mixed" application needs, this based on "point to many" The sharing way needs to seek another transmission way, the network hard disk is a very good solution way.

Advantages of network hard disk

Network hard disk (also known as shared space), is a disk space on the server, where, if you have sufficient permissions, you can operate it at will, as if using your local computer. To be aware, all this is transmitted in HTTP, in the form of the web in front of all users, through the familiar way of browser access, so that "a piece of space, resources are mixed" sharing mode to achieve!

In addition, the network hard disk interface runs on the client, which allows the user to submit data to the server and then manage the information in a specified range, which is heavily used in actual development, especially in building interactive network document management systems: Online exam systems, file transfer systems, The press release system as well as the company bids the system and so on has the massive application!

The following uses the ASP.net (Visual C # language implementation) and XML (Extensible Markup Language) to develop such a network hard disk system. The details of the development of the program and the key techniques and difficulties used in the code are explained in detail, and you can make your own network hard drive by referring to these instructions.

The function of network hard disk implementation

Our network hard disk implements the following features:

1. View Folder Contents

2, create a new folder can also set access rights

3. Jump between folders: Go to the next level, return to the previous level

4, upload files to the designated folder

5, download files to the local or online view the contents of the file

6. Delete files or folders



Development details and technical key points

1. View Folder Contents:

At the beginning of the program, the specified root folder (such as \nethard) is entered, and the contents of the folder are displayed in the data-bound control (DataGrid) list, which includes the following: categories (different folders or files), names, permissions (is it allowed to enter the folder?). Can i download a file? , delete (allow files or folders to be deleted?) ) and the creator of the folder. Here, because the contents of the folder are dynamically changing (you don't know when a user has sent files or created a new folder or deleted them), we are dynamically creating a DataTable to read the contents of the specified folder and then bind the DataGrid as the data source to the display control, so that The display of data is always timely. The function to create a dynamic table is as follows:

Public DataTable Bind (string fullfolderpath)//Create datasheet Read folder contents
{
Here's how to create a data table dynamically

Technical Exchange is endless



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.