2 * Namespace: System.Web.UI
6 * Maintainer-> gvaish@iitk.ac.in
8 * Contact: <gvaish@iitk.ac.in>
11 * (C) Gaurav Vaish (2001)
15 using System.Collections;
17 using System.Reflection;
19 namespace System.Web.UI
23 internal static object InvokeMethod(MethodInfo info, object obj, object[] parameters)
28 retVal = info.Invoke(obj, parameters);
29 } catch(TargetInvocationException tie)
31 throw tie.InnerException;
36 internal static string GetClientValidatedEvent(Page page)
38 return "if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate();";
41 internal static string GetClientValidatedPostBack(Control control)
43 return (" { if (typeof(Page_ClientValidate) != 'function' || Page_ClientValidate()) " +
44 control.Page.GetPostBackEventReference(control) +
49 internal static string GetScriptLocation(HttpContext context)
51 IDictionary dict = context.GetConfig("system.web/webControls")
56 loc = dict["clientScriptsLocation"] as string;
60 throw new HttpException("Missing_clientScriptsLocation");
62 if(loc.IndexOf("{0}") > 0)
64 //FIXME: Version Number of the ASP.Net should come into play.
65 //Like if ASP 1.0 and 1.1 both are installed, the script
66 // locations are in /aspnet_client/system_web/1_0_3705_0/
67 // and /aspnet_client/system_web/1_1_4322/
68 // (these entries are from my machine
69 // So, first I should get this Version Info from somewhere
70 loc = String.Format(loc, "system_web");