Author: mhabersack
Date: 2007-08-27 08:16:31 -0400 (Mon, 27 Aug 2007)
New Revision: 84871
Modified:
trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
Log:
2007-08-27 Marek Habersack <[EMAIL PROTECTED]>
* HtmlForm.cs: make sure the ID is set before HtmlControls renders
the attributes. Fixes bug #82596
Modified: trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
2007-08-27 12:09:40 UTC (rev 84870)
+++ trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
2007-08-27 12:16:31 UTC (rev 84871)
@@ -1,3 +1,8 @@
+2007-08-27 Marek Habersack <[EMAIL PROTECTED]>
+
+ * HtmlForm.cs: make sure the ID is set before HtmlControls renders
+ the attributes. Fixes bug #82596
+
2007-08-05 Vladimir Krasnov <[EMAIL PROTECTED]>
* HtmlHead.cs: refactoring, used AddAttribute overload without encoding
Modified: trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
2007-08-27 12:09:40 UTC (rev 84870)
+++ trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
2007-08-27 12:16:31 UTC (rev 84871)
@@ -273,14 +273,18 @@
w.WriteAttribute ("method", Method);
w.WriteAttribute ("action", action);
+ /*
+ * This is a hack that guarantees the ID is set
properly for HtmlControl to
+ * render it later on. As ugly as it is, we use it here
because of the way
+ * the ID, ClientID and UniqueID properties work
internally in our Control
+ * code.
+ *
+ * Fixes bug #82596
+ */
if (ID == null) {
- /* If ID != null then HtmlControl will
- * write the id attribute
- */
- w.WriteAttribute ("id", ClientID);
- Attributes.Remove ("id");
+ string client = ClientID;
}
-
+
string submit = Page.GetSubmitStatements ();
if (submit != null && submit != "") {
Attributes.Remove ("onsubmit");
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches