473,657 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.G etString(respon seBytes);
HtmlControl frame1 = (HtmlControl)th is.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 4035
"Robert Bravery" <me@u.comwrot e in message
news:F8******** *************** ***********@mic rosoft.com...
I have an Ifame on my page. I have retrieved a page response from a server
like:
string response = Encoding.UTF8.G etString(respon seBytes);
HtmlControl frame1 = (HtmlControl)th is.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.comwrot e in message
news:F8******** *************** ***********@mic rosoft.com...
HI All,

I have an Ifame on my page. I have retrieved a page response from a server
like:
string response = Encoding.UTF8.G etString(respon seBytes);
HtmlControl frame1 = (HtmlControl)th is.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
9742
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 or please wait...or some thing like that. I put image and text on top in file and then asp code but its not showing its only showing non asp part when its finishing the asp processing. I tried with response.buffer = false too. but no luck.
1
8281
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 dropdown lists. If you change the selection of the left one (e.g. choose parentoption2), it should open up page2.htm in a popup window.
2
4997
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 href="javascript:EditDatabase(3);">Edit</a> When this link is clicked it fires the EditDatabase() function which finds IFrame#2 by going up to the parent and getting IFrame#2 from there. It then does IFrame2.Src = "Database.aspx?ID=3"; This part of the...
1
7220
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
2428
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 page is loaded. How can I either generate the HTML on the fly as the form is loading or set the Src value of the IFrame tag as the page is loading? Thanks Ric
1
5888
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 C:\inetpub\wwwroot\MySite\temp2.pdf . In the code behind I try: Iframe1.Attributes.Add("src", "\\MySite\\temp2.pdf"); // THIS WORKS Iframe1.Attributes.Add("src",
0
1017
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 the("home.aspx") page, it has to load the ("x.page")in first iframe. I don't know how to do this?. Also, I need to pass the values of("home.aspx") to controls in("main.aspx") when button is clicked in home.aspx of second iframe. I...
0
8407
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8319
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8512
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2739
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.