2005-08-29 Chris Toshok <toshok@ximian.com>
authorChris Toshok <toshok@novell.com>
Mon, 29 Aug 2005 17:50:13 +0000 (17:50 -0000)
committerChris Toshok <toshok@novell.com>
Mon, 29 Aug 2005 17:50:13 +0000 (17:50 -0000)
* LinkButton.cs: fix some 2.0 Page/ClientScript obsolete warnings.

* CheckBox.cs: same.

* BaseValidator.cs: same.

* DropDownList.cs: same.

* ValidationSummary.cs: same.

svn path=/trunk/mcs/; revision=49071

mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataControlButton.cs
mcs/class/System.Web/System.Web.UI.WebControls/DropDownList.cs
mcs/class/System.Web/System.Web.UI.WebControls/LinkButton.cs
mcs/class/System.Web/System.Web.UI.WebControls/ValidationSummary.cs

index 30314235806952ff4ad9a24caf85420282bb7184..2812821f7b773852bd271425ae10950803f3490c 100644 (file)
@@ -387,22 +387,22 @@ namespace System.Web.UI.WebControls {
                        if (RenderUplevel) {
                                RegisterValidatorCommonScript ();
 
-                               Page.RegisterOnSubmitStatement ("Mono-System.Web-ValidationOnSubmitStatement",
-                                                               "if (!ValidatorCommonOnSubmit()) return false;");
-                               Page.RegisterStartupScript ("Mono-System.Web-ValidationStartupScript",
-                                                           "<script language=\"JavaScript\">\n" + 
-                                                           "<!--\n" + 
-                                                           "var Page_ValidationActive = false;\n" + 
-                                                           "ValidatorOnLoad();\n" +
-                                                           "\n" + 
-                                                           "function ValidatorOnSubmit() {\n" + 
-                                                           "        if (Page_ValidationActive) {\n" + 
-                                                           "                return ValidatorCommonOnSubmit();\n" + 
-                                                           "        }\n" + 
-                                                           "        return true;\n" + 
-                                                           "}\n" + 
-                                                           "// -->\n" + 
-                                                           "</script>\n");
+                               Page.ClientScript.RegisterOnSubmitStatement ("Mono-System.Web-ValidationOnSubmitStatement",
+                                                                            "if (!ValidatorCommonOnSubmit()) return false;");
+                               Page.ClientScript.RegisterStartupScript ("Mono-System.Web-ValidationStartupScript",
+                                                                        "<script language=\"JavaScript\">\n" + 
+                                                                        "<!--\n" + 
+                                                                        "var Page_ValidationActive = false;\n" + 
+                                                                        "ValidatorOnLoad();\n" +
+                                                                        "\n" + 
+                                                                        "function ValidatorOnSubmit() {\n" + 
+                                                                        "        if (Page_ValidationActive) {\n" + 
+                                                                        "                return ValidatorCommonOnSubmit();\n" + 
+                                                                        "        }\n" + 
+                                                                        "        return true;\n" + 
+                                                                        "}\n" + 
+                                                                        "// -->\n" + 
+                                                                        "</script>\n");
                        }
                }
 
@@ -428,18 +428,18 @@ namespace System.Web.UI.WebControls {
 
                protected void RegisterValidatorCommonScript ()
                {
-                       if (!Page.IsClientScriptBlockRegistered ("Mono-System.Web-ValidationClientScriptBlock")) {
-                               Page.RegisterClientScriptBlock ("Mono-System.Web-ValidationClientScriptBlock",
-                                                               String.Format ("<script language=\"JavaScript\" src=\"{0}\"></script>",
-                                                                              Page.ClientScript.GetWebResourceUrl (GetType(),
-                                                                                                                   "WebUIValidation.js")));
+                       if (!Page.ClientScript.IsClientScriptBlockRegistered ("Mono-System.Web-ValidationClientScriptBlock")) {
+                               Page.ClientScript.RegisterClientScriptBlock ("Mono-System.Web-ValidationClientScriptBlock",
+                                                                            String.Format ("<script language=\"JavaScript\" src=\"{0}\"></script>",
+                                                                                           Page.ClientScript.GetWebResourceUrl (GetType(),
+                                                                                                                                "WebUIValidation.js")));
                        }
                }
 
                protected virtual void RegisterValidatorDeclaration ()
                {
-                       Page.RegisterArrayDeclaration ("Page_Validators",
-                                                      String.Format ("document.getElementById ('{0}')", ID));
+                       Page.ClientScript.RegisterArrayDeclaration ("Page_Validators",
+                                                                   String.Format ("document.getElementById ('{0}')", ID));
                }
 
 #if NET_2_0
index e86cf3f38392cd2557e4f7f81cafdf43ee1245b5..257cfd605003290ff37257582871b5be6302eac1 100644 (file)
@@ -1,3 +1,15 @@
+2005-08-29  Chris Toshok  <toshok@ximian.com>
+
+       * LinkButton.cs: fix some 2.0 Page/ClientScript obsolete warnings.
+
+       * CheckBox.cs: same.
+       
+       * BaseValidator.cs: same.
+       
+       * DropDownList.cs: same.
+       
+       * ValidationSummary.cs: same.
+
 2005-08-28  Chris Toshok  <toshok@ximian.com>
 
        * XmlHierarchyData.cs: fix IHierarchyData.GetParent.
index 4eda8e052d71bd005d3344de989033e70c3de6a8..9abac8c14d61a142a236f49dba9f82a7f4d012b7 100644 (file)
@@ -256,7 +256,7 @@ namespace System.Web.UI.WebControls {
                                        NameAttribute);
                        
                        if (AutoPostBack) {
-                               w.AddAttribute (HtmlTextWriterAttribute.Onclick, Page.GetPostBackClientHyperlink (this, ""));
+                               w.AddAttribute (HtmlTextWriterAttribute.Onclick, Page.ClientScript.GetPostBackClientHyperlink (this, ""));
                        }
 
                        if (Checked) {
index 741d6cd0e06015ff56707c6625563318edea2854..89f6fb0ff32fe7b0648f06f762fb9fcd87eea56e 100644 (file)
@@ -100,7 +100,7 @@ namespace System.Web.UI.WebControls
                                        PostBackOptions ops = pcner.GetPostBackOptions (this);
                                        postScript = container.Page.ClientScript.GetPostBackEventReference (ops);
                                } else
-                                       postScript = Page.ClientScript.GetPostBackClientEvent (this, "");
+                                       postScript = Page.ClientScript.GetPostBackEventReference (this, "");
 
                                if (CausesValidation && Page.Validators.Count > 0) {
                                        // TOSHOK: review if this is the correct usage of the "fresh" client side stuff
index b0a8342961412ec584c203e5934e8d041c5c013b..e6219aeb033404cd2b17d527a5b3f259956cd705 100644 (file)
@@ -117,7 +117,7 @@ namespace System.Web.UI.WebControls {
                        writer.AddAttribute(HtmlTextWriterAttribute.Name, this.UniqueID, true);
 
                        if (AutoPostBack) {
-                               writer.AddAttribute (HtmlTextWriterAttribute.Onchange, Page.GetPostBackClientHyperlink (this, ""));
+                               writer.AddAttribute (HtmlTextWriterAttribute.Onchange, Page.ClientScript.GetPostBackClientHyperlink (this, ""));
                        }
 
                        base.AddAttributesToRender(writer);
index 7420431526998df66ebddef3d2c714e0ab4a971f..aa8e1509795d42510cbbf4d2caa7edc3256eedfe 100644 (file)
@@ -67,7 +67,7 @@ namespace System.Web.UI.WebControls {
                                                               csm.GetPostBackEventReference (this, String.Empty)));
                                w.AddAttribute ("language", "javascript");
                        } else {
-                               w.AddAttribute (HtmlTextWriterAttribute.Href, Page.GetPostBackClientHyperlink (this, ""));
+                               w.AddAttribute (HtmlTextWriterAttribute.Href, Page.ClientScript.GetPostBackClientHyperlink (this, ""));
                        }
                }
 
index 06041bbdb7259a48cd91c0e9cdfbdec8b6a16460..0c394e6917199df789fe95d9e65d3980b18165c3 100644 (file)
@@ -205,8 +205,8 @@ namespace System.Web.UI.WebControls {
                        }
 
                        if (EnableClientScript && pre_render_called) {
-                               Page.RegisterArrayDeclaration ("Page_ValidationSummaries",
-                                                              String.Format ("document.getElementById ('{0}')", ID));
+                               Page.ClientScript.RegisterArrayDeclaration ("Page_ValidationSummaries",
+                                                                           String.Format ("document.getElementById ('{0}')", ID));
                        }
 
                        // We have validators