diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2002-06-05 19:58:32 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2002-06-05 19:58:32 +0400 |
commit | 62aeab6dc17ed33644f8da189b788c2339648f4e (patch) | |
tree | a40651d92c5bc9a05863363b71e21edd87634584 /mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs | |
parent | a6e91ebb095fc3eb19b6350972bf5361353dd18c (diff) |
2002-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* System.Web.UI/AttributeCollection.cs: don't need a Hastable. StateBag
now works fine and takes care of the details.
* System.Web.UI/Control.cs: added HasChildren property.
* System.Web.UI/StateBag.cs: fixed a couple of nasty bugs.
* System.Web.UI.HtmlControls/HtmlButton.cs: RenderAttributes is an
override, not new.
* System.Web.UI.HtmlControls/HtmlContainerControl.cs: use the new
Render method in HtmlControl.
* System.Web.UI.HtmlControls/HtmlControl.cs: added Render method to
render the tag and its attributes. Works for container and
non-containers.
* System.Web.UI.HtmlControls/HtmlImage.cs: RenderAttributes don't need
to be new. Implemented Height property.
svn path=/trunk/mcs/; revision=5130
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs')
-rwxr-xr-x | mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs index 62135016d4c..a0ca1f13b3b 100755 --- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs +++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs @@ -14,9 +14,9 @@ namespace System.Web.UI.HtmlControls{ public HtmlImage(): base("img"){}
- protected new void RenderAttributes(HtmlTextWriter writer){
+ protected override void RenderAttributes(HtmlTextWriter writer){
PreProcessRelativeReference(writer,"src");
- RenderAttributes(writer);
+ base.RenderAttributes(writer);
writer.Write(" /");
}
@@ -59,6 +59,19 @@ namespace System.Web.UI.HtmlControls{ }
}
+ public int Height
+ {
+ get {
+ string attr = Attributes ["height"];
+ if (attr != null)
+ return Int32.Parse (attr, CultureInfo.InvariantCulture);
+
+ return -1;
+ }
+
+ set { Attributes["height"] = AttributeToString (value); }
+ }
+
public string Src{
get{
string attr = Attributes["src"];
|