示例#1
0
        public override string GetJavaScriptReferenceCode(StringCollection method, string attributeName, string[] parameters)
        {
            if (string.CompareOrdinal(attributeName, "IsFileTypeValid") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.toLowerCase().indexOf({1}.{2}.value.split('.').pop().toLowerCase()) >= 0", parameters[0], this.FormName, Site.Name));
            }
            if (string.CompareOrdinal(attributeName, "IsFileSizeValid") == 0)
            {
                return(string.Format(CultureInfo.InvariantCulture, "{0}.jsData.IsFileSizeValid({1})", Site.Name, parameters[0]));
            }
            string s = WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(WebPageCompilerUtility.JsCodeRef(CodeName), attributeName, method, parameters);

            if (!string.IsNullOrEmpty(s))
            {
                return(s);
            }
            return(null);
        }
 public string GetJavaScriptWebMethodReferenceCode(string ownerCodeName, string methodName, System.Collections.Specialized.StringCollection code, System.Collections.Specialized.StringCollection parameters)
 {
     return(WebPageCompilerUtility.GetJavaScriptWebMethodReferenceCode(ownerCodeName, methodName, code, parameters));
 }