A blog user uploads pictures to a picture folder on the web server. Whenever the user deletes a post, any picture associated with the deleted post must also be deleted. Every post record is saved with its picture jpg name on the backend.
I am creating an image converter which convert an image from one format into another format,what i am doing is i am calling a dll file(.cs file which is doing the conversion) from my program but i am facing a problem in that when i call the dll file it creates a unique guid for every image and then process it and convert that to another format and provide the result back to the calling class which saves the file by whatever name i want to save and then delete the guid file which were created in the root folder,everything is working fine but when i delete the file containing GUID it gives me an error saying that the file is already used by another process,i have checked everything many times.
Using "Enable Delete" from Gridview control, I can delete (besides, update, sort, paging, etc) data from the database (this is done automatically). However, how can I delete the actual image that resides in my image folder (i.e. from "pix" folder )? What is the best way to delete image? If using code behind, how? Please write a full code for me. Here is my source code.
I have requirement to copy or move file from webserver app folder to local file system folder (user selected). How is it possible in ASP.Net.
On my page i have textbox and browse button and user clicks browse button to select folder and there is Copy/Move button and when clicked the files under webserver folder should be move to the user selected folder. The webserver folder path is available to application.
I have huge excel files that I have to open from web browser. It takes several minutes to load huge file. Is it possible to open a single worksheet (single tab) at a time from excel file that contains many worksheets? I have to do this using C# / asp.net MVC
I am currently Developing application in MVC2 I want to used mutiple form tags(<form>) in My application. In My View I have Created a table which has Delete option which i am doing through Post for Individual Delete so i have Create form tag for each button. as mention By Stephen Walther [URL] i also want user to give option to delete mutiple records so i am providing them with checkboxes.This form should have all the values of checkboxes and all. so form gets render Like this in browser
I am working on asp.net 3.5 in C#. In my application I have to Create folder and upload file in that folder, which works fine on my machine. I want help for create folder and upload file in that folder on other machine which is connected in LAN. code for create folder and Upload file on my machine
I have an application in which the admin can upload files and the visitors of a website can download those files. I want to add an option that will allow admin to delete unwanted files from that folder how can this be done usin asp.net(vb).
I retrieve the image and save in a folder but i don't how to delete the image from the folder which have been save.. I used vb.net and sql server 2005.
I am using grid view and on grid delete image click i remove product but i also want to remove image phisically from the folder.i have deleted logically but i need code to delete from folder ?
On our website, we have an application within our website. The following is the folder structure:
website1 (main website) bin directory1 website2(an application) bin directory2 webconfig2 webconfig1
There are other folders under each of the main folders which contain other pages, images, etc.
We're trying to upgrade the website and are encountering some difficulties. We want to remove the website2 from the main website to see it it's causing the problem.
However, we cannot remove the bin folder and so we can't remove the website2 folder. We've been able to delete everything but the bin folder itself. We've tried downing the website and the application pool but we still get the 'access denied' error message.
I want to delete a folder in asp.netTo create the folder Directory.CreateDirectory(Path.Combine(Server.MapPath("~/Docs/"), idtxt.Text)); But how I can delete it?
i m using fileupload concept and saving the files to a folder download.hw can i check the files names saved in that folder while site is hosted on webserver.is there any way to delete some of files from that folder runtime.
I have a Silverlight application using a WCF service hosted in IIS. I make use of some aspects of ASP.NET. I have the following folder structure for my application:
inetput wwwroot myapp reports {user-guid-folders} report1.pdf report2.pdf App_Data (folder) bin (folder) Client_Bin (folder) (various .aspx files, plus web.config, etc.)
The application dynamically generates reports and puts them in a folder with a GUID for the name which is unique to the user. This all works fine. However, when the user logs out I was cleaning up and deleting the PDF files in their folder, then deleting their GUID folder.
Deleting the files works fine, but if I delete the folder, the application recycles (which then removes all other users' sessions - I get a Session_OnEnd event for every user's session, and an Application_OnEnd event. The next user request causes the whole application to restart. So, while I can fix this by not deleting the GUID folder (which my application itself created), what is the reason for this? Is there any way I can prevent this from happening?
im looking for help dealing with some task. im wondering if there is any code that can automatic delete all files and folders in server folder. I have folder call "uploads" and i want to: first option - delete all the folders and files that in that folder in some day and hour every week (lets say every sunday at 3 am), and if its not possible, option 2 - to trigger that process with button (delete all folders and files in "uploads" folder after click that button.
I use the simple code in onunload's body method like this:
<body onunload="closeIt()"> ... </body>
The closeIt method is call a server method, like this:
function closeIt () { $.ajax({ type: "POST", url: "mypage.aspx/myFunc", data: '{}', contentType: "application/json; charset=utf-8", dataType: "json", //async: false, success: function(response){}, failure: function(response) { alert(response.d); } }); } I delete a folder in temp directory in myFunc method. The folder's name is the same of value in Session["id"], like this: string id = Session["id"]; string temp = "~/temp" + id; temp = Server.MapPath(temp); DirectoryInfo dr = new DirectoryInfo(temp); Directory.Delete(dr.FullName);
When the last code( Directory.Delete(dr.FullName) ) is run, the all session in project is changed to null. If i disable the last code( //Directory.Delete(dr.FullName) ) every thing work properly(all session have the value). Why when i enable the last code, all session are null? What's the problem and how can i solve it?
i store a image path in a folder as well as database.so i need when a user delete a image from database same time image within folder should be delete.