Click here to Skip to main content
15,914,109 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i had an asp.net file upload control in which i will browse and upload files.i have an attach button besides browse button,,,when i clcik on attach button after selecting the files from browse the file names should be diaplyed with delete button on right sideof each label.

if i clcik on delete that particular file should be deleted..

now when i clcick on submit button a mail should send including all attchments..
please suggest
how to dispplay the file and corespondingly a delete button for all files i have attched..please
Posted
Comments
Richard MacCutchan 7-Jan-14 10:09am    
You cannot delete files from a browser.
spanner21 7-Jan-14 10:10am    
thansk Richard,can i remove the files before sending mail
Richard MacCutchan 7-Jan-14 10:12am    
No.
gettgotcha 7-Jan-14 10:38am    
You mean to say for delete option its on to the attachment file rather than deleting it from physical folder, that is for example for gmail attachments you see a "x" which will remove the files from the mail to which you have attached the files.
spanner21 7-Jan-14 12:51pm    
yes exactly

1 solution

You can try the jQuey Plugin jQuery File Upload Demo[^]

It seems ideal for your requirement.
 
Share this answer
 
v2
Comments
spanner21 7-Jan-14 10:15am    
thanks tadit but i acnt use jquery
Why can't?
spanner21 7-Jan-14 10:19am    
Hi Tadit due to client restrictions
First of all, I can't find any reason why they don't allow you to do so.

Anyway, if you can't use the Plugin, then apply your own logic. Something like below.

- When upload button is clicked, show all the file info in a GridView.
- in GridView, have a column, which will show a delete button, you can show a cross image also.
- on click of that cross image or delete button, just delete that row from GridView.

So, do something like this and try to implement. But I would still suggest you to go for jQuery Plugin as there are many advantages and it is also efficient and speed enough. Try to convince the client, else apply your own logic like I explained above.

Good luck, keep coding. Please accept and up vote the answer if you find it useful. :)

Thanks,
Tadit

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