How to change iframe src ?

How to change iframe src ?

am 31.01.2008 15:46:42 von divati

id="fband"
name="fband"
--> src="band.aspx?S=Other"
width="100%"
height="300"
scrolling="auto"
frameborder="0">


How to change iframe by using VS 2008 C# ?

Re: How to change iframe src ?

am 31.01.2008 15:56:48 von Eliyahu Goldin

First of all set for the iframe runat="server".

Then you can get it on server side as
HtmlGenericControl myFrame = this.FindControl("fband") as
HtmlGenericControl;

Then you can set its attributes:
myFrame.Attributes["src"]="...";

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Atilla" wrote in message
news:d361602f-2f3b-42ab-a195-f8724821e5dc@e10g2000prf.google groups.com...
> > id="fband"
> name="fband"
> --> src="band.aspx?S=Other"
> width="100%"
> height="300"
> scrolling="auto"
> frameborder="0">
>
>
> How to change iframe by using VS 2008 C# ?