Author: mhabersack
Date: 2006-11-25 20:09:43 -0500 (Sat, 25 Nov 2006)
New Revision: 68463

Modified:
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
Log:
Event validation fix for the Calendar control

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs    
2006-11-25 17:53:30 UTC (rev 68462)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs    
2006-11-26 01:09:43 UTC (rev 68463)
@@ -786,10 +786,6 @@
 #endif         
                override void Render (HtmlTextWriter writer)
                {
-#if NET_2_0
-                       if (Page != null)
-                               Page.ClientScript.RegisterForEventValidation 
(this.UniqueID);
-#endif
                        Table table = new Table ();
                        table.CellSpacing = CellSpacing;
                        table.CellPadding = CellPadding;
@@ -1089,6 +1085,9 @@
                        hasLink = (Page != null && hasLink == true) ? true : 
false;
 
                        if (hasLink) {
+#if NET_2_0
+                               
Page.ClientScript.RegisterForEventValidation(this.UniqueID, arg);
+#endif                 
                                str = "<a href=\"";
                                str += 
Page.ClientScript.GetPostBackClientHyperlink (this, arg);
                                str += "\"";

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-11-25 17:53:30 UTC (rev 68462)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-11-26 01:09:43 UTC (rev 68463)
@@ -1,3 +1,9 @@
+2006-11-26  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * Calendar.cs: Fixed event validation registration. Now it
+       registers all the arguments that can be passed by this control to
+       the application.
+
 2006-11-25  Marek Habersack  <[EMAIL PROTECTED]>
 
        * FileUpload.cs: Implementation of SaveAs

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to