Make the html object into a server side control.
1) Add and id="myobject" and runat="server" attributes to the object in the
html code:
<iframe id="MyIframe" runat="server"></iframe>
2) Dim the object in your codebehind page as a
System.Web.UI.HtmlControls.HtmlGenericControl:
Protected MyIframe As System.Web.UI.HtmlControls.HtmlGenericControl
3) Now you may add attibutes dynamically as suzy suggests.
MyIframe.Attributes.Add("[Attribute Name]", "[Attribute Value]")
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"Linus Martinsson" <Li**************@swipnet.se> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
How can I change attribute in html elements from my aspx.cs page?
For example if I want to change the src-attribute in an iframe.
//Linus