473,326 Members | 2,023 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.

Loading response into Iframe

HI All,

I have an Ifame on my page. I have retrieved a page response from a server
like:
string response = Encoding.UTF8.GetString(responseBytes);
HtmlControl frame1 = (HtmlControl)this.FindControl("iframe1");

I need to put the resultant page into the iframe as the src, But cant figure
out how to do it. Obviously the response, as a string object wont work.
How can I make the response, which has the html code of the rendered page,
into the scr of the Iframe so that it would display correctly

Thanbks
Robert

Jun 27 '08 #1
2 3998
"Robert Bravery" <me@u.comwrote in message
news:F8**********************************@microsof t.com...
I have an Ifame on my page. I have retrieved a page response from a server
like:
string response = Encoding.UTF8.GetString(responseBytes);
HtmlControl frame1 = (HtmlControl)this.FindControl("iframe1");

I need to put the resultant page into the iframe as the src, But cant
figure out how to do it. Obviously the response, as a string object wont
work.
How can I make the response, which has the html code of the rendered page,
into the scr of the Iframe so that it would display correctly
You can set the src of the iframe to point to a .ashx inside your web
site, and then code the .ashx to serve out as its response the content that
you retrieve in your own code (which you would move into the .ashx). You can
also do it with a .aspx but it is less efficient.
Jun 27 '08 #2
Here is a short article that shows how to manipulate an IFRAME server side,
set the src property, etc:

http://www.eggheadcafe.com/tutorials...e-iframes.aspx

--Peter
"Robert Bravery" <me@u.comwrote in message
news:F8**********************************@microsof t.com...
HI All,

I have an Ifame on my page. I have retrieved a page response from a server
like:
string response = Encoding.UTF8.GetString(responseBytes);
HtmlControl frame1 = (HtmlControl)this.FindControl("iframe1");

I need to put the resultant page into the iframe as the src, But cant
figure out how to do it. Obviously the response, as a string object wont
work.
How can I make the response, which has the html code of the rendered page,
into the scr of the Iframe so that it would display correctly

Thanbks
Robert
Jun 27 '08 #3

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

Similar topics

4
by: MFA | last post by:
Hi All I have one ASP page. During opening this page its taking some time to open as its has to process some asp code. I want to display some animated gif or text showing that page is loading...
1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
2
by: Steve - DND | last post by:
There has to be an answer out there somewhere for this, but I couldn't find it in Google anywhere. I have a page with two IFrames. In IFrame#1 I have a link that looks like so: <a...
1
by: Mel | last post by:
how can i wait for one iframe to completely load before loading a second one ? thanks for your help
3
by: Namshub | last post by:
I'm trying to create a dynamic link to different sources when a page loads (I want a set of buttons at the top before the IFrame) but the content of the IFrame will be dynamic but know when the...
1
by: Control Freq | last post by:
Hi, Confused about loading a pdf file into an iframe from C# code behind. I have a PDF file called temp2.pdf in my document root. The file is physically located at...
0
by: Twinkles | last post by:
Hello friends, I'm having an ("main.aspx")Asp.net page with 2 iframes. Second frame is by default loaded with a ("home.aspx")asp.net page. When button is clicked in...
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...
1
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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.