G
Guest
I'm rather new to ASP .Net, so I appologize in advance if I'm asking a dumb
question here. I've been searching all over the place for an answer and
haven't found a single one.
I'm working on a form that gives the user a file control to upload a file
from their machine to my server. With this file control are two buttons; one
marked "Upload", the other marked "Cancel". The cancel button is to give
them the option of just backing out entirely. Upon clicking the Cancel
button, the C# code redirects them to the previous page.
The problem I'm having is that if the user has already selected a file on
their computer (through clicking Browse, etc.) and they click "Cancel" the
file is uploaded to the server anyway. How do I prevent the upload if they
click the "Cancel" button and not the "Upload" button.
Thanks in advance,
ed
question here. I've been searching all over the place for an answer and
haven't found a single one.
I'm working on a form that gives the user a file control to upload a file
from their machine to my server. With this file control are two buttons; one
marked "Upload", the other marked "Cancel". The cancel button is to give
them the option of just backing out entirely. Upon clicking the Cancel
button, the C# code redirects them to the previous page.
The problem I'm having is that if the user has already selected a file on
their computer (through clicking Browse, etc.) and they click "Cancel" the
file is uploaded to the server anyway. How do I prevent the upload if they
click the "Cancel" button and not the "Upload" button.
Thanks in advance,
ed