Merge pull request #1345 from mattleibow/websocket-continuation-frame-fix
[mono.git] / mcs / class / System.Web / System.Web.UI.HtmlControls / HtmlLink.cs
index 7351e6ddccc428b7c1683e721a66f6c564e1d1f8..2c068e368b13caaf2914b334f6e138e7a7c8af95 100644 (file)
@@ -4,7 +4,7 @@
 // Authors:
 //     Chris Toshok (toshok@ximian.com)
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -26,8 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.ComponentModel;
 using System.Collections;
 using System.Security.Permissions;
@@ -43,7 +41,7 @@ namespace System.Web.UI.HtmlControls
                }
 
                [DefaultValue ("")]
-               [UrlPropertyAttribute ("*.*")]
+               [UrlProperty]
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
                public virtual string Href {
                        get {
@@ -70,9 +68,10 @@ namespace System.Web.UI.HtmlControls
                [MonoTODO ("why override?")]
                protected override void RenderAttributes (HtmlTextWriter writer)
                {
+                       if (Href.Length > 0)
+                               Href = ResolveClientUrl (Href);
                        base.RenderAttributes (writer);
                }
        }
 }
 
-#endif