Dynamic content to IFrame...

B

Blue Streak

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..."
 
D

darrel

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
 
B

Blue Streak

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.
 
D

darrel

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
 

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,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top