I am working on mvc5 project. After save image on server, then I am dynamically binding its name with delete button. here is jquery code,
- success: function (res) {
-
- var content = '<div id="' + res.fileName + '"><img id="' + res.imgId + '" src="' + res.imgFullPath + '" width="135" height="135"> <button onclick="return product.DeleteProImage("' + res.fileName + '")">Delete</button> <input type="hidden" value="' + res.fileName + '" name="img_' + res.id + '"></div>';
- }
Now dynamically binding div 'uploadedImages' looking below image.
But, now I am click on the delete button it is not executing 'product.DeleteProImage('imagename')' fuction. How can I solve this issue ?