Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog4
-rwxr-xr-xmcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs4
2 files changed, 7 insertions, 1 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
index f8351b2edbf..adc7e4b2b14 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
@@ -1,3 +1,7 @@
+2003-12-29 Alon Gazit <along@mainsoft.com>
+ * HtmlInputButton.cs: update the implementation of RenderAttributes().
+ Change the if statement that determines if the onclick script is rendered.
+
2003-12-28 Alon Gazit <along@mainsoft.com>
* HtmlSelect.cs: add parentheses to if statement.
Currently the else statement refers to the inner if statement.
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs
index c6d7342b2d2..3ad014e3612 100755
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs
@@ -35,7 +35,9 @@ namespace System.Web.UI.HtmlControls{
string type = Type;
if (String.Compare (type, "button", true) == 0 || String.Compare (type, "submit", true) == 0) {
string script = Page.GetPostBackClientEvent (this, String.Empty);
- if (script != null && Page.Validators.Count > 0){
+ if (script != null &&
+ ((String.Compare (type, "button", true) == 0 && Events[EventServerClick] != null )||
+ (String.Compare (type, "submit", true) == 0 && Page.Validators.Count > 0))){
AttributeCollection coll = Attributes;
if (coll ["language"] != null)
coll.Remove ("language");