473,395 Members | 1,948 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,395 software developers and data experts.

how to declare an iFrame in C# Code Behind

Hello

I am using a C# file to run some code that will extract a single html filename from a list of html file names (stored in file or list). I would then like to be able to display the html file extracted in an iFrame. How do I declare the iFrame in my C# file? Which namespaces must I declare? Thanks for any help

John
Nov 16 '05 #1
3 13676
Hello,

What is the type of your application? If it is an ASP .NET app, you could
create a server control which would programmatically render the enclosing
IFRAME tags and would then push the HTML file contents to the IFRAME through
a piece of JavaScript code. Or, even better - just set the SRC attribute of
the IFRAME to the path to the extracted HTML file.

If it is a WinForms app, you then probably actually mean the WebBrowser
control, and this is a completely different question. Could you please
clarify your problem?

"FarmerJohn" <j.**********@snet.net> wrote in message
news:C3**********************************@microsof t.com...
Hello,

I am using a C# file to run some code that will extract a single html filename from a list of html file names (stored in file or list). I would
then like to be able to display the html file extracted in an iFrame. How do
I declare the iFrame in my C# file? Which namespaces must I declare? Thanks
for any help.
John


Nov 16 '05 #2


Here's some background.... I am creating a C# asp.Net Web Application. I
have my iFrame defined in my aspx and I can set the SRC attribute as you
suggested with no problem. What I am really trying to do is obtain a web
page from the GoogleSearchAPI. The Google code that goes out to Google
and gets the web page name is in a c# file included in my project (let's
call is google.cs). I have another C# file (let's call it call
google.cs) that makes a call to google.cs.

Here's my problem...
In google.cs there is a line as follows...
using System.Web.Services.Protocols;
google.cs compiles fine in the project I downloaded from Google, but
when I include it in my project I get the following compiler error...
e:\inetpub\wwwroot\AutoSpelunk\Google.cs(22): The type or namespace name
'Services' does not exist in the class or namespace 'System.Web' (are
you missing an assembly reference?)

I asume this is because I am creating a different "target" application
than the one the project downloaded from google was. Any ideas as to
what I can do to get around this? You may not have enough to go on to
help, but any suggestions would be appreciated. Thanks!

John

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3
Hello,

Please diregard the above posts. I have gotten around the problem.
Thanks.

John

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4

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

Similar topics

4
by: Jaco | last post by:
Hey, Maybe I am in the wrong newsgroup. I am writing an browserapplication. In the webpage I have 2 parts a fixed part and a variable part. The variable part is an IFRAME. If I press a button in...
6
by: seans | last post by:
Hi, please, can somebody help me with this? I have an iframe on a form. I need to add "runat=server" to the iframe tag to convert to a HTML Server control. When I do that I get the error CS1012:...
2
by: Jeronimo Bertran | last post by:
Hi, I have a page with a very data intensive grid which needs to be automatically refreshed constantly if a change is detected. In order to not refresh the complete page so often, I created an...
1
by: Tim H | last post by:
Hey there. In my app, I was rendering my report in PDF, then creating the html for my iframe object and then doing a response.write and writing that text. However, I need to place the iframe...
5
by: Andreas Heusler | last post by:
Is it possible, in code-behind, to get a handle to an IFRAME on an aspx page, so the IFRAME's src property can be set by server-side code? Thanks AH
5
by: Chris Kennedy | last post by:
I want to put an Iframe on a webform page. How do I get the Iframe's source file to change at the press of button control on a web form (containing the iframe). Preferabaly without javascript,...
7
by: pb | last post by:
Hi all, I have some code that automatically generates a url depending on user selections. This url is then set as a hyperlink and the user clicks on the link that has the target as an iframe on...
0
by: johnw182 | last post by:
Ok, I have a asp.net project. Everything works great. HOWEVER, this project was made to be called from within a frame or iframe. When being used within the iframe the user gets a blank frame when...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.