diff options
author | Alon Gazit <alon@mono-cvs.ximian.com> | 2003-12-29 19:53:34 +0300 |
---|---|---|
committer | Alon Gazit <alon@mono-cvs.ximian.com> | 2003-12-29 19:53:34 +0300 |
commit | 149ba450ca849724f114bf9e427a9b017af2101d (patch) | |
tree | bf85f8a64f5d62b4b441f9039e6607c6c437d135 /mcs/class/System.Web | |
parent | 152039aa973f22c85f8c2bf006a26ac701eba160 (diff) |
update the implementation of RenderAttributes().
Change the if statement that determines if the onclick script is rendered.
svn path=/trunk/mcs/; revision=21536
Diffstat (limited to 'mcs/class/System.Web')
-rw-r--r-- | mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog | 4 | ||||
-rwxr-xr-x | mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs | 4 |
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");
|