473,395 Members | 2,798 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.

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 3163
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.