ok to use file upload in showModalDialog page?

  • Thread starter Thread starter Sarah
  • Start date Start date
S

Sarah

I am using the javascript showModalDialog function to open a file upload
window. The function opens a page which contains a usercontrol housing the
file upload stuff. The control works fine when tested independently, but
when called through showModalDialog on submit, another window is opened (a
fullsize version of the page passed to showModalDialog).

Is this a bug, by design, or have I made some sort of error?

thanks
 
This is by design. The work around is to use IFRAME.

Instead of directly calling your fileupload aspx page from main page, you
will need to create an HTML /ASPX page with an IFRAME and set the IFRAME
source as fileupload aspx page

<IFRAME width='100%' height='100%' NAME="framHostUpload" SRC="fileupload.aspx"
</IFRAME>
 
since no one answered so far,

There is a bug/design feature of this function which means the
postback(submit) launches a new window of the calling page. There is a
workaround for it though. I don't have the detailss, but I think google for
"showModalDialog postback" should turn it up.
 
Back
Top