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
bruce barker - 26 Sep 2007 21:08 GMT
this is pretty standard. most web based email systems use this for
attachments.
-- bruce (sqlwork.com)
> I was looking for a solution, without the full page postback, and all the
> tip was about a hidden iframe and RJS.
[quoted text clipped - 17 lines]
>
> Bjorn
Bjorn Sagbakken - 26 Sep 2007 21:54 GMT
Maybe so. Since I am quite new with AJAX, this local event still gave me a
good feeling - to re-invent a small wheel....
Bjørn
> this is pretty standard. most web based email systems use this for
> attachments.
[quoted text clipped - 22 lines]
>>
>> Bjorn