Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Cannot drop more then 1 item on UserControl running in Internet Explorer

Reply
Thread Tools

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

 
 
Johan smith
Guest
Posts: n/a
 
      08-03-2003
What am I missing?
I want to drag and drop multiply files onto UserControl running in Internet
Explorer.

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
Else
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())
MessageBox.Show(filenames.Length)
End Sub

4. added ref in asp.net to the compiled dll

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

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.



 
Reply With Quote
 
 
 
 
Albrecht Scheidig
Guest
Posts: n/a
 
      08-04-2003
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

"Johan smith" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> What am I missing?
> I want to drag and drop multiply files onto UserControl running in

Internet
> Explorer.
>
> 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
> Else
> 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())
> MessageBox.Show(filenames.Length)
> End Sub
>
> 4. added ref in asp.net to the compiled dll
>
> <OBJECT id="TestCtl1" classid="TestCtl.dll#testCtl.UserControl1"
> VIEWASTEXT> </OBJECT>
>
> 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.
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Explorer 8: C:\Program Files\Internet Explorer\iexplore.exe vs C:\Program Files (x86)\Internet Explorer\iexplore.exe Nathan Sokalski Windows 64bit 16 02-22-2010 08:31 AM
internet explorer 7 - Internet Explorer cannot display the webpag sandy j Windows 64bit 0 05-02-2009 02:12 AM
ASP.Net 2.0 Insert new item, then display this new item in Edit mo Ann ASP .Net Web Controls 0 03-28-2007 01:11 AM
If / Then / Else Help Needed - More then one condition possible? tbird2340@gmail.com Javascript 15 09-21-2006 01:27 PM
Help. SessionID is x then y then x then y BodiKlamph@gmail.com ASP General 0 09-03-2005 03:02 PM



Advertisments