I post some code..
private void listBox1_DragDrop(object sender, DragEventArgs e)
{
Array a = (Array)e.Data.GetData(DataFormats.FileDrop);
if (a != null)
{
// if i execute the activeX in a windows Form the
a.Length property value is the exact number of file that i have
selected
// if i execute the activeX in a web Form the
a.Length property value is always 1 for (int i =0 ;
i< a.Length; i++)
{ string s
= a.GetValue(i).ToString();
if (!listBox1.Items.Contains(s))
{
string filename =
System.IO.Path.GetFileName(s);
listBox1.Items.Add(filename);
}
}
}
}
Anyone knows why in web Form The value of a.Length is Always 1?
Thanks wery much
There's more going on here that what you are admitting to. This simply
wouldn't work as is in a web form, you'd need to tweak CAS policy. To debug
your issue, what you should do is wire a mouse down event that spits out the
number of objects. Modify your dragdrop routine to spit out the number of
objects in the array. When you run the app, if these two numbers are
different, it's a windows issue and not your issue. Otherwise, it's fixable.
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------
"deccio" <denis...@gmail.com> wrote in message
news:2527ef3f-5169-4f85...@x35g2000hsb.googlegroups.com...
It was a cas problem. Thanks for the suggestion.