Merge branch 'cecil-light'
[mono.git] / mcs / class / System.Web / System.Web.UI.HtmlControls / HtmlInputButton.cs
index c674ec1922584023e3da5c110f359af21ed04909..86aee3dd4156cb4082aa2b36363f1aad5a31f2b3 100644 (file)
@@ -233,7 +233,11 @@ namespace System.Web.UI.HtmlControls {
                                }
 
                                if (onclick.Length > 0) {
-                                       writer.WriteAttribute ("onclick", onclick, true);
+                                       bool encode = true;
+                                       if (Events [ServerClickEvent] != null)
+                                               encode = false; // tests show that this is indeed
+                                                               // the case...
+                                       writer.WriteAttribute ("onclick", onclick, encode);
                                        writer.WriteAttribute ("language", "javascript");
                                }
                        }