Change Iframe in a aspx

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

Guest

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 the fixed part, I want to change the contents of my IFrame (= changing the source of my Iframe to another webpage).

How do I do this?
The Iframe I can not maged it from my c-sharp code (I don't see it as a webcontrol).

Thanks
Jac
 
The button on the fixed part should just be a link with a "target" attribute
equal to the id of the Iframe, and that points to the page that now want
displayed within your iframe. An example:

on the static part:
<a href="newIframepage.aspx?par1=something" target="myIFrame">Click me to
change the Iframe</a>

then on the varialbe part:
<iframe id="myIFrame" (other attributes I'm sure go here) >

HTH,
-Cliff



Jaco said:
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 the fixed part, I want to change the contents of my
IFrame (= changing the source of my Iframe to another webpage).
 
It dont' work.
It opens a new window with the contents of the webpage. It don't show in my iframe.

How can I fix it?
Jac
 
Found it, the Iframe must have a NAME not an ID

Jac said:
It dont' work.
It opens a new window with the contents of the webpage. It don't show in my iframe.

How can I fix it?
Jac
 
The code below is pure html.
Now i want to do it in the code behind a button (C-sharp) When i push a button I go to the server and there we test om some criteria. Depends on which criteria the Iframe must show an other page. It is like a redirect but only in the Iframe not the whole page.

Tks,
Jac
 
Back
Top