how to declare an iFrame in C# Code Behind

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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 said:
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.
 
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
 
Hello,

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

John
 
Back
Top