2011-07-19 74 views
0

有没有人有任何通过DRAG和DROP上传多个图像的例子。目前,我正在使用uploadify上传来上传多张图片并将其绑定到datalist中。它工作得很好。如何将uploadify上传为上传图片的拖放功能?

但现在我想将其转换为拖放,因此用户不必点击btn并选择文件,他/她只需选择图像并拖放它,然后将其上传并绑定到datalist中。

+0

感谢您的答,但我很抱歉,你答不工作对我来说... – Rocky

回答

0

那么,你需要一个DragDrop事件集,把下面的代码:

void Form_DragDrop(object sender, DragEventArgs e) 
{ 
    // Extract the data from the DataObject-Container into a string list 
    string[] FileList = (string[])e.Data.GetData(DataFormats.FileDrop, false); 

    // Do something with the data... 

    // For example add all files into a simple label control: 
    foreach (string File in FileList) 
     this.label.Text += File + "\n"; 
} 
+0

我想使我的图像上传像http://krystalware.com/slickupload/demos例子 – Rocky