473,326 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Dynamic content to IFrame...

Hello, Folks!

I am trying to create dynamic content for an IFrame object within an ASPX page. I did not want to try and pull its content from another page. Previously in ASP.Classic I would use a bunch of Response.Write commands that would spit out a buch of JavaScript code to populate the IFrame like:
<IFrame name="ifrmTarget"> </IFrame>
<%
Response.Write "document.ifrmTarget.writeln('" ... "');"
%>
(I may be a little off on the syntax)

As you can tell this was pretty inefficient because the work of generating the IFrame content was client-side intensive. Things really got slow when I was outputting the results of a query in a table with more than a hundred records!

Now, I would like to do this sort of thing in ASP.NET and VB.NET. From what little I know I am thinking of this approach:

ASPX file:
<IFrame runat="server" id="ifrmTarget" />

Code-behind:
Protected ifrmTarget as HtmlGenericControl
...
ifrmTarget.Attributes.Add("src") = CoughUp()

Will this work?!
Now, I just have to figure out how to conver the output of a DataGrid to a string/HTML output if at all possible.

TIA...

"The early bird may get the work but the second mouse gets the cheese..."
Nov 19 '05 #1
3 2743
> I am trying to create dynamic content for an IFrame object within an ASPX
page.
I did not want to try and pull its content from another page.


If the iFrame isn't pulling information from another page, then there's no
need to use an iFrame.

If what you are after is simply a scrolling box, use a div, and set it's css
to this:

overflow: scroll

-Darrel
Nov 19 '05 #2
The scrolling-box DIV-layer doesn't work because I have Selection /
ListBoxes appearing on my page. The DIV-layer (or Panel) objects cannot
appear on top of Selection object.
"darrel" <no*****@hotmail.com> wrote in message
news:ey*************@tk2msftngp13.phx.gbl...
I am trying to create dynamic content for an IFrame object within an
ASPX page.
I did not want to try and pull its content from another page.
If the iFrame isn't pulling information from another page, then there's no
need to use an iFrame.

If what you are after is simply a scrolling box, use a div, and set it's

css to this:

overflow: scroll

-Darrel

Nov 19 '05 #3
> The scrolling-box DIV-layer doesn't work because I have Selection /
ListBoxes appearing on my page. The DIV-layer (or Panel) objects cannot
appear on top of Selection object.


Can an iframe float above form elements?

Sounds like you need to rearrange the interface a bit. Another option is to
simply hide the form elements when you show this bit of information.

-Darrel
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Csaba2000 | last post by:
I want to be able to embed a single quote into an INPUT element within a dynamically generated IFRAME. The example below shows how the IFRAME is generated. Challenge: I'd like the alert box to...
2
by: Templar | last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe...
1
by: Peter | last post by:
Hi, Does anyone know of how I could dynamically resize an iframe based on the content's height (for IE) so that no scrollbar appears for the iframe? The content will be from a different domain....
1
by: mike888 | last post by:
I want to create dynamic iframe content like below but in Firefox <iframe width="100%" height="100" src="#"></iframe> <script language="JavaScript"><!-- document.frames.document.open();...
1
by: redbaks | last post by:
Hi! I am trying to implement adding widgets to our template editor (for blogs). I am worried that i might open a window for XSS attacks so i decided to enveloped all widgets inside an iframe. ...
9
by: pbd22 | last post by:
Hi. This is just a disaster management question. I am using XMLHTTP for the dynamic loading of content in a very crucial area of my web site. Same as an IFrame, but using XMLHTTP and a DIV. I...
3
polymorphic
by: polymorphic | last post by:
I have succeeded in embedding PDF files in a dynamic iframe. The problem is that I need the PDF to cache. If the PDF remains the same from page load to page load then the pdf is somehow cached with...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.