B
Bjorn Sagbakken
I was looking for a solution, without the full page postback, and all the
tip was about a hidden iframe and RJS.
The RJS was not known to me before, and still I haven't explored this used
with ASP.NET
But, the iframe issue gave me an idea; why not put the fileupload control &
a submit button on a form, nothing else. Then on my main form I added an
iframe, a visible one, with src=the form with the file upload control.
Ok, this shows very nice in the browser, no one will see that a small part
of the main form actually is another form. Next, on hitting the file submit
button, the file is actually uploaded to a temp folder on the server -
without the page beeing posted back! On doing this I also write the uploaded
filename to a session variable, so the "Save" button on the main form can
attach to the file for further proccessing, and finally delete the temp
file.
I am kind of new to AJAX so maybe I'm stupid, but nevertheless this approach
actually works.
Bjorn
tip was about a hidden iframe and RJS.
The RJS was not known to me before, and still I haven't explored this used
with ASP.NET
But, the iframe issue gave me an idea; why not put the fileupload control &
a submit button on a form, nothing else. Then on my main form I added an
iframe, a visible one, with src=the form with the file upload control.
Ok, this shows very nice in the browser, no one will see that a small part
of the main form actually is another form. Next, on hitting the file submit
button, the file is actually uploaded to a temp folder on the server -
without the page beeing posted back! On doing this I also write the uploaded
filename to a session variable, so the "Save" button on the main form can
attach to the file for further proccessing, and finally delete the temp
file.
I am kind of new to AJAX so maybe I'm stupid, but nevertheless this approach
actually works.
Bjorn