Mondeo Posted April 5, 2007 Posted April 5, 2007 I have a fileupload control on a page. I know it has a boolean property called HasFile. Ideally I need an event to fire when the HasFile property changes, is this possible? Can I wire up a manual event to watch a property and fire when it changes? Thanks Quote
Fork501 Posted April 7, 2007 Posted April 7, 2007 Since the file upload control isn't actually ASP-driven, it doesn't have an auto-postback feature. You will actually have to use JavaScript for this. For example, your HTML would look like this (between the <body> and </body> tags): <script type="text/javascript"> function DoThis(){ alert("Hello"); } </script> <input type="file" onchange="DoThis()" /> If I'm right, I'm right. If I'm wrong, I'm wrong. But in my experience, this is the only way to get anything dynamic out of a File control. Good luck, I hope this helps! ~Derek Quote Check out my blog! DevPaper.NET
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.