예제 #1
0
        /// <summary>
        /// Writes an enum representation to the current page.
        /// </summary>
        /// <param name="type">The type of the enum.</param>
        /// <param name="page">The page where the JavaScript shoult be rendered in.</param>
        public static void RegisterEnumForAjax(Type type, System.Web.UI.Page page)
        {
            RegisterCommonAjax(page);

            RegisterClientScriptBlock(page, Constant.AjaxID + ".AjaxEnum." + type.FullName,
                                      "<script type=\"text/javascript\">\r\n" + JavaScriptUtil.GetEnumRepresentation(type) + "\r\n</script>");
        }
예제 #2
0
        /// <summary>
        /// Writes an enum representation to the current page.
        /// </summary>
        /// <param name="type">The type of the enum.</param>
        /// <param name="page">The page where the JavaScript shoult be rendered in.</param>
        public static void RegisterEnumForAjax(Type type, System.Web.UI.Page page)
        {
            RegisterCommonAjax(page);

            RegisterClientScriptBlock(page, Constant.AjaxID + ".AjaxEnum." + type.FullName,
                                      "<script" + AjaxPro.Utility.Settings.AppendContentSecurityPolicyNonce() + " type=\"text/javascript\">\r\n" + JavaScriptUtil.GetEnumRepresentation(type) + "\r\n</script>");
        }