Physical drive file match with database file in ASP.NET MVC

genasukablead

New Member
I have an upload button on my website and that upload button saves a file the user selected on my hard drive (for now), and it also saves the name (with Guid.NewGuid) + a friendly name (actual name) up in the database.The file is saved at Content/Usercontent (the Guid.NewGuid name), but what I want, is that when you delete a row from your database, that the file in the map Content/Usercontent is also deleted, how do I do this with ASP.NET MVC
 
Back
Top