>>An IFRAME is an Inline frame (remember frames on websites way back when? Same idea, except they can be anywhere in the page). So you essentially end up with two web pages being displayed on the same page. A lot of 3rd party web controls for ASP.NET use an IFRAME to display their "pop-in" windows. I use one to make a site that was written in VFP (FoxWeb) appear as though it's part of our larger ASP.NET website - the user selects something off the menu and the content gets rendered into the IFRAME.
>>
>>Here's what that looks like:
>>
>>In the ASPX page:
>>
>>
>><asp:Content ID (removed) %
>> <<iframe src="<%= this.NavTo %" width="100%" height="600px"</iframe
>></asp:Content
>>
>>
>>In the code-behind:
>>
>>
>> public string NavTo
>> {
>> get
>> {
>> return Request.QueryString["NavTo"] ?? "";
>> }
>> }
>>
>>
>>When you navigate to the ASPX page you just include a NavTo parameter:
>>
>>
http://localhost/ShowPDF.aspx?NavTo=/pdfs/SamplePDF.PDF>
>I do remember frames, I think I still have an old website out there with frames on it. I will experiment with this and see what happens.
>Thanks
>Tim
If you add the runat="server" tag to your iFrame you can access it like this in your codebehind:
NonImageIframe.Attributes["src"] = ResolveUrl("~/Report.aspx");
Report.aspx was an existing page in which I was already using ExportToHttpResponse from the Crystal Reports report object to stream a PDF straight to the browser.
Regards,
E.R. Gilmore