
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 ?
can i add the function ondragstart="drag(event)" to the dynamic image in the code ?

Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Nov 23, 2014, 6:33 PM EST
Use
gavriel ankri36 reputationPosted Nov 24, 2014, 1:35 AM EST
I can move the dynamic image now, but do you know why when I click the button another time, everything goes back. I mean I can move the image, but when I click the button, the image came back to the first place.
can I make it stay in the new place after page refresh ?
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Nov 24, 2014, 1:39 AM EST
As i think you placed your code inside button click events so every time you click that button new instance of image is created so it goes back.
gavriel ankri36 reputationPosted Nov 24, 2014, 2:05 AM EST
and in the button click I just did num++
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Nov 24, 2014, 2:12 AM EST
in Button click. Its working fine its zooming the image.
gavriel ankri36 reputationPosted Nov 24, 2014, 2:20 AM EST
if I move the image and then press the button, the image come back to the original place
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Nov 24, 2014, 2:32 AM EST
For doing that you have to remove that Image control when you click that button and add another image control after that.
gavriel ankri36 reputationPosted Nov 24, 2014, 4:09 AM EST