473,322 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

delete an uploaded file using upload contol tool ?

1
hi all ,
coming to the problem straight away...
i was trying to find out how new tools,unknown for me works out in asp.net...
in upload control it worked out pretty well for newbie like me.
but when del. part came i'm stuck.
how to do delete , for an uploaded file ?
how to pop out that window (which allows you to browse and select file for deleting) ?
which command for finding the path of that file ?

thanks for looking into this problem...
if any body wants i can put that code in here, but it's wrong somewhere...
Feb 21 '09 #1
2 5073
Frinavale
9,735 Expert Mod 8TB
You are going to have to create an ASP Page or a User Control that displays the files that the person can select for deleting.

Look into using a GridView to display the files and allow the user to delete them. Look into using the Objects found in the System.IO namespace to help you retrieve file information and delete the files selected.

-Frinny
Feb 23 '09 #2
Hi
Firstly you have to checked this file already exist or not.
after that you can delete files.


Expand|Select|Wrap|Line Numbers
  1. If (File.Exists(Server.MapPath("../FolderName/Filename "))) Then
  2.                     File.Delete(Server.MapPath("../FolderName/Filename"))
  3. End If
Feb 25 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: lawrence | last post by:
I've two scripts, one to upload images, another to delete them. The upload script works fine, but the delete script has permissions trouble. How can PHP not have permission to delete an image it...
4
by: Michael K. | last post by:
Hi there I am having trouble deleting an uploaded file that I have just written to disc. I am using the SaveAs method of a HttpPostedFile to write the file to disc, then straight after I'm...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
0
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
4
by: riteshjain82 | last post by:
Hi, Please go through this: I am having a file (default.asp) on which i am taking many details from a user before mailing it to someone. I have also provided the user with a facility of...
0
by: smanisankar | last post by:
hi, the following is the full page code for uploading a file to server. since i got no idea to overwrite the file, i want delete the file if the file is already uploaded. i got the folder name...
0
by: teddymeu | last post by:
Hi Guys, since I've done nothing but ask questions these last few weeks to get my first application up and running I thought it was about time to share the wealth and help out a newbie like me since...
2
by: karthik kaliyaperumal | last post by:
I have inserted wordpad files to some folder(C:\karthik) through file upload tool in .net. Now i want fill those files name to dropdown list and i want delete that particular file which i have...
9
Maidenz08
by: Maidenz08 | last post by:
Hi, I am developing a monitoring tool which logs all the files that are being uploaded. I am using FileSystemWatcher class to achive this. When a file is selected for upload the Changed event of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.