X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web%2FSystem.Web.UI.WebControls%2FCheckBox.cs;h=27c3a7fb9dc870f7018c9a6956ef0871173ecb54;hb=a01fb8227b364663dbc0a8ef50cebf8e6b9563d0;hp=905740a1ea9d9f4d4e896cadb7e7ceaa1e177f25;hpb=811674bc6331c98d33134e2a37a7c7dd66402227;p=mono.git diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs b/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs index 905740a1ea9..27c3a7fb9dc 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs @@ -370,7 +370,11 @@ namespace System.Web.UI.WebControls Page page = Page; string onclick = page != null ? page.ClientScript.GetPostBackEventReference (GetPostBackOptions (), true) : String.Empty; onclick = String.Concat ("setTimeout('", onclick.Replace ("\\", "\\\\").Replace ("'", "\\'"), "', 0)"); - w.AddAttribute (HtmlTextWriterAttribute.Onclick, BuildScriptAttribute ("onclick", onclick)); + if (common_attrs != null && common_attrs ["onclick"] != null) { + onclick = ClientScriptManager.EnsureEndsWithSemicolon (common_attrs ["onclick"]) + onclick; + common_attrs.Remove ("onclick"); + } + w.AddAttribute (HtmlTextWriterAttribute.Onclick, onclick); } if (AccessKey.Length > 0)