In .:
[mono.git] / mcs / class / System.Web / System.Web.UI.HtmlControls / HtmlAnchor.cs
index 7bea980b04f584d17e1e1e1533cd0be72dc4b60b..69d3a1b8b5d0f192b94a8855f7c89169d82ea2dd 100644 (file)
@@ -155,6 +155,11 @@ namespace System.Web.UI.HtmlControls {
                                if (hr != "")
                                        HRef = ResolveUrl (hr);
                        }
+
+                       string target = Attributes ["target"];
+                       if ((target == null) || (target.Length == 0))
+                               Attributes.Remove("target");
+
                        base.RenderAttributes (writer);
 
                        // but we never set back the href attribute after the rendering