1 //------------------------------------------------------------------------------ 2 // <copyright file="HtmlIframe.cs" company="Microsoft"> 3 // Copyright (c) Microsoft Corporation. All rights reserved. 4 // </copyright> 5 //------------------------------------------------------------------------------ 6 7 namespace System.Web.UI.HtmlControls { 8 using System.ComponentModel; 9 using System.Web; 10 using System.Web.UI; 11 12 public class HtmlIframe : HtmlContainerControl { 13 HtmlIframe()14 public HtmlIframe() : base("iframe") { 15 } 16 17 [ 18 WebCategory("Behavior"), 19 DefaultValue(""), 20 DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), 21 UrlProperty() 22 ] 23 public string Src { 24 get { 25 string s = Attributes["src"]; 26 return s ?? String.Empty; 27 } 28 set { 29 Attributes["src"] = MapStringAttributeToString(value); 30 } 31 } 32 33 /* 34 * Override to process src attribute 35 */ RenderAttributes(HtmlTextWriter writer)36 protected override void RenderAttributes(HtmlTextWriter writer) { 37 PreProcessRelativeReferenceAttribute(writer, "src"); 38 base.RenderAttributes(writer); 39 } 40 41 } 42 } 43