473,320 Members | 2,111 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,320 software developers and data experts.

iframe in WebForm

Hi,
I have a WebForm and in this WebForm i have IFRAME with name="obsah".
How can I from C# code load a page into this IFRAME?

Thanks Lubos
Nov 16 '05 #1
2 3160
1) Set the iframe tag to run at server.
2) Create a variable in the code-behind that is of HtmlGenericControl (or
something like that).
3) Use a method to create the @src attribute.
"Lubo¹ ©lapák" <lu**********@centrum.cz> wrote in message
news:uG**************@TK2MSFTNGP15.phx.gbl...
Hi,
I have a WebForm and in this WebForm i have IFRAME with name="obsah".
How can I from C# code load a page into this IFRAME?

Thanks Lubos

Nov 16 '05 #2
You need to specify the ID attribute for the iframe as well as
runat="server".
Then create an instance of
System.Web.UI.HtmlControls.HtmlGenericControl matching the ID that you
specified for the element.

Then, use
[INSTANCE].Attributes ["src"] = myURL;

Where myURL is the URL to the page you want to load.

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"Lubo¹ ©lapák" <lu**********@centrum.cz> wrote in message
news:uG**************@TK2MSFTNGP15.phx.gbl...
Hi,
I have a WebForm and in this WebForm i have IFRAME with name="obsah".
How can I from C# code load a page into this IFRAME?

Thanks Lubos

Nov 16 '05 #3

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

Similar topics

0
by: Lubo¹ ©lapák | last post by:
I have iframe in webform and when I load a page into iframe, then i want go back on the previous page, which was in iframe before. How can I do it?
1
by: Lubo¹ ©lapák | last post by:
I have iframe in webform and I load a page into iframe, then when I click on button on this page I want go back on the previous page, which was in iframe before. How can I do it?
4
by: L Anthony Johnson | last post by:
Has anyone had any success doing this. I have tried, but the InnerHTML property always comes back as an empty string. L Anthony Johnson
3
by: Peter | last post by:
I have a webform on this form is a User Control and another webform in IFRAME On the User Control there is a save button. I want to click this button and somehow tell the webpage in IFRAME that...
4
by: Nad | last post by:
Hello, When I click on a linkbutton of a datagrid on a web form I open another web form on the same page within an iframe. The page within the iframe has a datagrid also and when I click on a...
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,...
0
by: Brent.Lakatos | last post by:
ASP.NET 2.0 Question: I have a simple IFrame User Control that I wrote: HTML: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="IFrameControl.ascx.cs" Inherits="IFrameControl" %> ...
2
by: rodchar | last post by:
hey all, let's say i have a single button on a page which is shown thru an iframe on my webform. if i press the button that's inside the iframe is there a way to write text to a textbox that's...
1
by: msxkim | last post by:
Hi all, I have a webpage with one iframe and a button. On Page Load event, if (!Page.IsPostBack) { string sDocUrl = //some doucmen url Iframe1.Attributes = sDocUrl; }
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.