Hello,
I was wondering if anyone knew how to get a DropTarget's info. Say I have multiple textboxes and when I drop data into one of them, I would like to be able to get the name of the textbox that I dropped data into.
I was playing around with e.DropTargets.ToString();
But didn't really get anything out of it.
Thanks for any help,
Kiet
Thank you both for the replies. Just what I needed!!
Hello Kiet,
I think you need to access the DragDropEventArgs.DropTarget property.
Best regards.Plamen.
Hi Kiet,
Please convert the type of the object. I think that the Drop event becomes such mounting.
TextBox textBox = e.DropTargets as TextBox; if (textBox != null) { switch (textBox.Name) { case "TextBox Name1": //implementation individual drop processing break; case "TextBox Name2": //implementation individual drop processing break; case "TextBox Name3": //implementation individual drop processing break; } }
Regards.