I would like to know what events get executed (if any) after a user has selected to submit a file for upload on an ASP.NET page.
Would I need to tweak anything at the IIS level?
Should the page life cycle events be triggered when the user uploads a file?
I see different behaviour on my development server from Visual Studio in regards to the IIS server I deploy to:
on the development server, the life
cycle events get triggered when a file
gets selected, on the deployed server
they don’t..
What classes would I need to override, what web.config settings should I change, in order to tweak the default behaviour of the upload?
The problem I am having, is finding documentation on how to have code executed before the file gets uploaded, but after a file got selected.
P.S. this is related to a previous question of mine here, but approached in a very different way in the hopes of understanding the whole upload process, so I thought it’s a different question all together.
No, it has no event for file upload(maybe on .net 4)
what I did was a class that derives from the upload object and on OnLoad event something like this:
sort of that.
Joe
— Edit:
Oh, I re-read your post and you want to know when people selects a file but it is not yet sent to the server?
thats javascript.
Server side can’t know when people select it without sending a information to the server.
You can develop a WebService function that is called when the onchanged of the input has been called, but I don’t know if thats a good idea.
Can you use javascript for this?
try:
on code behind:
hope it helps.