Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
in my web application i place a image in imagecontrol
and i took one image button
when i click imagebutton and i move mouse on the image
then i need erase that image so what code i follow
erase means paraticular area on the image not whole image .
so please provide source code.
Posted
Updated 15-Jun-10 4:10am
v2

1 solution

If you want to 'erase' the image from the web page (I.E. remove it from the DOM on the client) you'll need to know the ID of the image or the DIV or SPAN that it's in. Use that ID in script to remove it - or hide it - from the DOM. If you were using jQuery, it would look something like this:

$("#your-div").toggle();


If you're meaning that you want it removed from the file system on the server, you'll need to call a method in your application that, in turn, makes a call to File.Delete (MSDN docs). This will vary on implementation depending on what version of ASP.NET you're using and whether or not you're using the MVC framework.

Finally, you'll need to make sure that the ASP.NET account on your server has the appropriate permissions on the directory where the image is stored.

Cheers,
-jc
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900