mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* Utils.cs (GetClientValidatedEvent): Uncommented the 'Page' argument. svn path=/trunk/mcs/; revision=4487
47 lines
1.0 KiB
C#
47 lines
1.0 KiB
C#
/**
|
|
* Namespace: System.Web.UI
|
|
* Class: Utils
|
|
*
|
|
* Author: Gaurav Vaish
|
|
* Maintainer-> [email protected]
|
|
* Implementation: yes
|
|
* Contact: <[email protected]>
|
|
* Status: ??%
|
|
*
|
|
* (C) Gaurav Vaish (2001)
|
|
*/
|
|
|
|
using System;
|
|
using System.Reflection;
|
|
|
|
namespace System.Web.UI
|
|
{
|
|
internal class Utils
|
|
{
|
|
internal static object InvokeMethod(MethodInfo info, object obj, object[] parameters)
|
|
{
|
|
object retVal = null;
|
|
try
|
|
{
|
|
retVal = info.Invoke(obj, parameters);
|
|
} catch(TargetInvocationException tie)
|
|
{
|
|
throw tie.InnerException;
|
|
}
|
|
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) +
|
|
" } " );
|
|
}
|
|
}
|
|
}
|