Loading IFrames with docs and pdfs?

G

Guest

Hi,

We have documents on a file share that we want to load into an iframe when
the page loads AND without the File Download dialog box appearing.

I've managed to accomplish this with pdfs by setting the src attribute
dynamically in the code behind below. However, using the same code, Word docs
always prompt the File Download box and, when I click Open, seem to take over
the entire browser instead of loading in the iframe. Is this by design or is
there a work-around? Thanks, Dave.

protected System.Web.UI.HtmlControls.HtmlGenericControl myIframe;

private void Page_Load(object sender, System.EventArgs e)
{
myIframe.Attributes.Add("src", @"\\sharename\docs\profile.pdf");
}
 
D

darrel

We have documents on a file share that we want to load into an iframe when
the page loads AND without the File Download dialog box appearing.

You can't control this from your end. This is a client-side
setting/setup/preference issue.

-Darrel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top