This tutorial is the second of a three part series on image delete options using George Petrov's Pure ASP upload. The first shows how to handle image delete and remove options on an update form with a single image. This tutorial looks at update forms with multiple image fields. Having more than one image imposes limitations on image remove and delete options, but with a bit of imaginative thinking and a little hand coding we'll see that we can provide users with a full array of image handling options.
Multiple Image Delete & Remove Options for Pure ASP Upload
If the user uploads a new image, this how we determine which image is being updated if any and delete the old file. ' check to see if the user has
replaced an image and delete old image the value in red should match the
name of the image field in your form So that's it after this the stock UD generated code executes the update
query and that's all there is to it. There are few holes in this, but
it is about as close we are going to get to perfect world. Don't forget
to download the sample application
and the tutorial.pdf. MM_editCmd.CommandText = MM_editQuery
|
James Threadgill
James Threadgill has authored numerous tutorials on ASP and ASP.NET web development, published on such sites as the Dynamic Zones and MSDN Accademic Alliance. He co-authored the Sam's book Dreamweaver MX: ASP.NET Web Development.
James first began computer programming in 1995 while attending Alvin Community College. He completed a certificate of computer science program and an Associate of Arts degree at Alvin before going on to the University of Houston-Clear Lake where he was awarded a Bachelor of Science and a Master of Arts.
James publishes fiction, poetry, and visual arts under the name Wayne James. His fiction first appeared in Raconteur in 1995 and since has been published numerous times: in Hadrosaur Tales 5 and 7, Bayousphere, and in the Write Gallery e-zine. His poetry first appeared in the small press magazine Lucidity in 1996 and has been published numerous times since. His collection of fiction and poetry, When Only the Moon Rages, was released in 2000. Most recently his work appeared in Tales of the Talisman winter 2010 and spring 2011 issues. James currently attends graduate school at the University of Houston and owns and operates small web design and internet marketing firm, WWWeb Concepts, with his wife, Karen, in Houston, TX USA.
Comments
remove checkbox
How do I remove just 1 or 2 images?
How can I use checkbox to "delete_images1" , "delete_images2" and "delete_images3" with out deleting all images?
You must me logged in to write a comment.