Avatar of Mark Klein
Mark Klein
Flag for United States of America asked on

One step image load and display

I am building an asp.net website in which a user picks an image from the user's file system and displays it on the site.  The code is presently working as a two step process:
1. Use FileUpload control to let the user select a file from local storage.  A Browse button is shown, and the user picks the file with the file name in the control
2. User clicks a Display button.  The file is checked and displayed so the user can add a description before uploading to db.

My client wants a one-step process, eliminating the Display button. I have unsuccessfully tried to implement this by triggering on the FileUpload events.  I've tried them all, w/o success. FileUpload only captures the file name.  How do I kick off my processing routines without another button click?
ASP.NETVisual Basic.NET

Avatar of undefined
Last Comment
Mark Klein

8/22/2022 - Mon
Nasir Razzaq

The form has to be posted back to the server for the file to be uploaded. This postback is usually done by button click.

To do what you want, you would need to use either Flash/silverlight or ActiveX.

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Mark Klein

Had to adjust the filepath slightly, adding "~/" and then it worked.  Thx
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.