【问题标题】:How to make uploadify upload as drag and droppable for uploading the images?如何将uploadify 上传为可拖放以上传图片?
【发布时间】:2011-07-19 08:31:04
【问题描述】:

有没有人有任何通过 DRAG 和 DROP 上传多个图像的示例。现在我正在使用uploadify upload来上传多个图像并将其绑定到datalist。效果很好。

但现在我想将其转换为拖放,因此用户无需单击 btn 并选择文件,他/她只需选择图像并将其拖放即可上传并绑定到 datalist。

【问题讨论】:

  • 感谢您的回答,但很抱歉您的回答对我不起作用...

标签: c# asp.net uploadify


【解决方案1】:

好吧,你需要一个 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";
}

【讨论】:

猜你喜欢
  • 2017-05-21
  • 1970-01-01
  • 2017-12-23
  • 2016-08-19
  • 2012-06-26
  • 2020-10-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多