Hi,
In the method
System.Web.UI.WebControls.BaseValidator::RegisterValidatorCommonScript()
I need information about the location of the WebUIValidator.js file kept
in system_web subdirectories when ASP.Net is registered using
aspnet_regiis.exe (-i option).
Now, there can be many versions of the ASP.Net installed and hence many
JS files - as I can see three such locations on my computer corresponding to
1.0.3755..0, 1.0.3705.288 and 1.1.4322.
I get this information from a method in class
System.Web.UI.Utils::GetScriptLocation(HttpContext) - but at the final
implementation point, I don't have the exact version information.
===> How do I get this information of the version number?
===> More precisely, the location of the JS script file.
For IIS / .Net, it's installed in
<WWWROOT>/aspnet_client/system_web/<version>/
where <WWWROOT> generally corresponds to "C:\Inetpub\wwwroot"
but for other implementations like on Apache (mod_mono) / XSP, the
installation path may differ or -- Gonazlo, are you using the same path for
the js file? The attachment contains this file... for 1.1.4322.
(Sorry for the zip, but .js was sacked by Exchange Antivirus!!!!)
Cheers,
Gaurav
http://gvaish.virtualave.net
--------------------------------
[MonoTODO]
internal static string GetScriptLocation(HttpContext context)
{
IDictionary dict = context.GetConfig("system.web/webControls");
string loc = null;
if(dict != null)
{
loc = dict["clientScriptsLocation"] as string;
}
if(loc == null)
{
throw new HttpException("Missing_clientScriptsLocation");
}
if(loc.IndexOf("{0}") > 0)
{
//FIXME: Version Number of the ASP.Net should come into play.
//Like if ASP 1.0 and 1.1 both are installed, the script
// locations are in /aspnet_client/system_web/1_0_3705_0/
// and /aspnet_client/system_web/1_1_4322/
// (these entries are from my machine
// So, first I should get this Version Info from somewhere
loc = String.Format(loc, "system_web");
}
return loc;
}
WebUIValidation.zip
Description: Binary data
