From 53cade753c6af40dc4c7f684729b8057eaa4a854 Mon Sep 17 00:00:00 2001 From: Gaurav Vaish Date: Fri, 28 Dec 2001 00:41:50 +0000 Subject: 2001-12-28 Gaurav Vaish * Utils.cs -- Added functions GetClientValidatedEvent, GetClientValidatedPostBack svn path=/trunk/mcs/; revision=1731 --- mcs/class/System.Web/System.Web.UI/Utils.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'mcs/class/System.Web/System.Web.UI/Utils.cs') diff --git a/mcs/class/System.Web/System.Web.UI/Utils.cs b/mcs/class/System.Web/System.Web.UI/Utils.cs index d184ac9b1a8..48138375e13 100644 --- a/mcs/class/System.Web/System.Web.UI/Utils.cs +++ b/mcs/class/System.Web/System.Web.UI/Utils.cs @@ -3,10 +3,10 @@ * Class: Utils * * Author: Gaurav Vaish - * Maintainer: gvaish@iitk.ac.in + * Maintainer-> gvaish@iitk.ac.in * Implementation: yes * Contact: - * Status: ?% + * Status: ??% * * (C) Gaurav Vaish (2001) */ @@ -30,5 +30,17 @@ namespace System.Web.UI } return retVal; } + + internal static string GetClientValidatedEvent(/*Page page*/) + { + return "if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate();"; + } + + internal static string GetClientValidatedPostBack(Control control) + { + return (" { if (typeof(Page_ClientValidate) != 'function' || Page_ClientValidate()) " + + control.Page.GetPostBackEventReference(control) + + " } " ); + } } } -- cgit v1.2.3