Click to See Complete Forum and Search --> : How to show aspx content inside iframe in IE7 instead of downloading it


iisha
02-29-2008, 10:33 AM
All hail, people.

I'm having a serious issue here. I'm in desperate need to know which Internet Explorer settings allow me to view aspx generated content instead of asking me to download that source file?

Thank you in advance! Regards.

toicontien
02-29-2008, 05:28 PM
What mime type is being sent with the file? It should be text/html.

iisha
02-29-2008, 05:33 PM
MimeType is xml.

I tried to override the Content-Disposition to "inline" but VB.net won't recognize it...

toicontien
02-29-2008, 06:05 PM
Is the mime type literally "xml" or "text/xml"?

Is the page in the IFRAME an XML document?

I know these questions might sound kind of silly. I'm just trying to get a feel for what you're trying to accomplish. If the mime type is anything but for an HTML document, JPG, PNG, GIF or BMP, it's likely that Internet Explorer will prompt the user to download the file rather than trying to display it.

iisha
02-29-2008, 06:12 PM
That's ok, yell at will ;)

The mimetype is actually 'text/xml'. The file that prints xml content is an .aspx page. The iframe's src attribute is that same .aspx page.

toicontien
03-01-2008, 12:51 PM
I'm pretty sure whether or not Internet Explorer downloads or opens a text/xml file is a user setting. Are you trying to use the IFRAME so you can access the DOM of the XML document? If that's the case you'll want to use AJAX.

iisha
03-02-2008, 04:47 AM
I just want to present that xml so i can save it later, like i just presented an ordinary xml file within a normal window. I know there's an option for that, but I don't know which one...!

Boy...am I happy to see you read my thoughts... AJAX was exactly what I proposed my company but the app is meant to show that xml with all the "fanchy colersh and all that shtuffh". I said to me "are these guy retards or what.." But oh well, I gain my survival on this, so it has to be like the boss tells me ;)

toicontien
03-03-2008, 09:54 AM
So you want to view the source code of the XML file in a normal window? I still maintain that it's a user setting as to whether or not an XML file is displayed or downloaded by the browser. I have not run into any "magic bean" code that overrides this sort of default browser behavior.

My sympathies for difficult clients.

PS: They should know they aren't impressing anyone with showing XML on their pages. In fact, it could end up making them look like amateurs.

Client: (in 1950's TV announcer voice) Increase the Flash Gordon noise and put more science things around.

User: What's all this mumbo jumbo? Don't these people know what they're doing?