Cannot drop more then 1 item on UserControl running in Internet Explorer

Discussion in 'ASP .Net' started by Johan smith, Aug 3, 2003.

  1. Johan smith

    Johan smith Guest

    What am I missing?
    I want to drag and drop multiply files onto UserControl running in Internet

    1. In a Class Library Project I have added User Control
    2. Added a Label to the User Control and set the AllowDrop Property to True
    3. added the following events:

    Private Sub Label1_DragEnter(ByVal sender As Object, _
    ByVal e As
    System.Windows.Forms.DragEventArgs _
    ) Handles Label1.DragEnter
    If e.Data.GetDataPresent(DataFormats.FileDrop, False) = True Then
    e.Effect = DragDropEffects.Copy
    e.Effect = DragDropEffects.None
    End If
    End Sub

    Private Sub Label1_DragDrop(ByVal sender As Object, _
    ByVal e As
    System.Windows.Forms.DragEventArgs _
    ) Handles Label1.DragDrop
    Dim filenames() As String =
    CType(e.Data.GetData(DataFormats.FileDrop), String())
    End Sub

    4. added ref in to the compiled dll

    <OBJECT id="TestCtl1" classid="TestCtl.dll#testCtl.UserControl1"

    The results of the DragDrop are always 1!
    While running the user control on windows application and not on Internet
    Explorer results in the correct length.

    Any help will be appreciated.
    Johan smith, Aug 3, 2003
    1. Advertisements

  2. For me the follwing works (same scenario) in dragdrop-handler:
    Dim fileNames() As String
    fileNames = e.Data.GetData(DataFormats.FileDrop)

    Btw. How will your control be installed on other machines than yours?

    Albrecht Scheidig, Aug 4, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.