gavriel ankri

gavriel ankri

  • NA
  • 39
  • 48.5k

how to add Drag and Drop function to dynamic image ?

Nov 22 2014 7:57 AM
hello. I created an image to be draggable:


  <img id="drag1" src="image/table3.png" draggable="true" ondragstart="drag(event)" width="150" height="150">


however, I want to create the image dynamically:

 Image tblImg = new Image();
tblImg.ImageUrl = "image/table3.png";

can i add the function ondragstart="drag(event)"  to the dynamic image in the code ?




Answers (8)