开发者

Display loading message and then prompt for open / save

I'm trying to get a page to show a "loading..." message while I create a report and then I'd like to trigger an open / save on the report I've just created.

I can create a static loading page but I don't know how to trigger the open / save dialog. I could insert an <iframe> but then I would have to save the created report on the server side.

What I'm looking for is a way to just embed the created report into the HTML and let the browser deal with (the report files are Excel and PDF).

Is there a way to do that? I looked at <embed> but it requires a URL, same as <iframe&开发者_JAVA百科gt;.

Maybe my best bet is to handle everything in an Http handler and make a first call to generate the report and then do a redirect to display it (and trigger the open / save).

Any ideas?


Are you allowed to use javascript?

You could have javascript on the loading page that either pops up a new window with the report generation or triggers a redirect to the report generation. In the report generation handler you can then set the content-disposition header to force the open/save box.


In the end, I didn't bother with the waiting message. I just point my Silverlight client at the HTTP handler address and wait for it to create it. I had issues with the <embed> tag and the Acrobat Reader plugin (the plugin would time out and not load the report when it was ready) but that doesn't happen at all when the browser waits for the page to load.

So, not an answer but it works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜