Link to home
Start Free TrialLog in
Avatar of brooklynDev
brooklynDev

asked on

ASP.Net page with input file ( every button uploads file, how do I prevent )

I have an asp.net page built with controls and linkbuttons all over the place. Every link or button on the page posts my one form to the server. This page also has a file input html control, and now all the buttons on page tries to upload the file, when I would only want this to happen if the submit button is pressed.

Is there any .net way to disable the file upload when certain control events are thrown?

bd
ASKER CERTIFIED SOLUTION
Avatar of raterus
raterus
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sethUSer420
sethUSer420

That solution looks promising, I'll try it now

raterus, to answer your question, the control can remain blank, I just want the cancel button to clear the elements of the form without uploading the file if one has been selected.
I read through your terms and conditions, yes, please delete my old account

sorry about the confusion, was an accident