-/**\r
- * Namespace: System.Web.UI.WebControls\r
- * Class: ImageButton\r
- *\r
- * Author: Gaurav Vaish\r
- * Maintainer: gvaish@iitk.ac.in\r
- * Contact: <my_scripts2001@yahoo.com>, <gvaish@iitk.ac.in>\r
- * Implementation: yes\r
- * Status: 100%\r
- *\r
- * (C) Gaurav Vaish (2001)\r
- */\r
+//
+// System.Web.UI.WebControls.ImageButton.cs
+//
+// Authors:
+// Gaurav Vaish (gvaish@iitk.ac.in)
+// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
+//
+// (C) Gaurav Vaish (2002)
+// (C) 2003 Andreas Nahr
+//\r
\r
using System;\r
using System.Collections;\r
public ImageButton(): base()\r
{\r
}\r
-\r
+
+ [DefaultValue (true), Bindable (false), WebCategory ("Behavior")]
+ [WebSysDescription ("Determines if validation is performed when clicked.")]\r
public bool CausesValidation\r
{\r
get\r
ViewState["CausesValidation"] = value;\r
}\r
}\r
-\r
+
+ [DefaultValue (""), Bindable (true), WebCategory ("Behavior")]
+ [WebSysDescription ("An argument for the Command of this control.")]\r
public string CommandArgument\r
{\r
get\r
ViewState["CommandArgument"] = value;\r
}\r
}\r
-\r
+
+ [DefaultValue (""), WebCategory ("Behavior")]
+ [WebSysDescription ("The name of the Command of this control.")]\r
public string CommandName\r
{\r
get\r
return HtmlTextWriterTag.Input;\r
}\r
}\r
-\r
+
+ [WebCategory ("Action")]
+ [WebSysDescription ("Raised when the LinkButton is clicked.")]\r
public event ImageClickEventHandler Click\r
{\r
add\r
Events.RemoveHandler(ClickEvent, value);\r
}\r
}\r
-\r
+
+ [WebCategory ("Action")]
+ [WebSysDescription ("Raised when a LinkButton Command is executed.")]\r
public event CommandEventHandler Command\r
{\r
add\r
{\r
string xCoord = postCollection[UniqueID + ".x"];\r
string yCoord = postCollection[UniqueID + ".y"];\r
+ string id = postCollection[UniqueID];
if(xCoord != null && yCoord != null && xCoord.Length > 0 && yCoord.Length > 0)\r
{\r
x = Int32.Parse(xCoord);\r
y = Int32.Parse(yCoord);\r
- Page.RegisterRequiresRaiseEvent(this);\r
- }\r
+ Page.RegisterRequiresRaiseEvent(this);
+ } else if (id != null)
+ {
+ //
+ // This is a workaround for bug #49819. It appears that the .x and .y
+ // values are not being posted, and only the x value is being posted
+ // with the ctrl's id as the key.
+ //
+ x = Int32.Parse (id);
+ Page.RegisterRequiresRaiseEvent (this);
+ }
return false;\r
}\r
\r