AJH.CMS.WEB.UI.Controls.SWFUpload.SWFUpload_UC.OnPreRender C# (CSharp) Метод

OnPreRender() защищенный Метод

protected OnPreRender ( EventArgs e ) : void
e System.EventArgs
Результат void
        protected override void OnPreRender(EventArgs e)
        {
            string scriptFlash = "<script type=\"text/javascript\" language=\"javascript\">" +
            "\n" + "var " + this.SWFClientID + ";" +
                //"\n" + "window.onload = function () {" +
            "\n" + "var settings = {" +
                "\n" + "flash_url: \"" + ResolveClientUrl("~/Controls/SWFUpload/script/swfupload.swf") + "\"," +
                "\n" + "upload_url: \"" + ResolveClientUrl(UploadPage) + "\"," +
                "\n" + "post_params: { \"ASPSESSIONID\": \"" + Session.SessionID + "\" }," +
                "\n" + "file_size_limit: \"" + UploadFileSizeLimit + "\"," +
                "\n" + "file_types: \"" + FileTypes + "\"," +
                "\n" + "file_types_description: \"" + FileTypeDescription + "\"," +
                "\n" + "file_upload_limit: " + TotalFilesUploadLimit + "," +
                "\n" + "file_queue_limit: " + TotalFilesQueueLimit + "," +
                "\n" + "custom_settings: {" +
                    "\n" + "progressTarget: \"" + fsUploadProgress.ClientID + "\"," +
                    "\n" + "cancelButtonId: \"" + btnCancel.ClientID + "\"" +
                "\n" + "}," +
                "\n" + "debug: false," +

                "\n" + "// Button settings" +
                "\n" + "button_image_url: \"" + ResolveClientUrl(ButtonImageUrl) + "\"," +
                "\n" + "button_width: \"" + ButtonWidth + "\"," +
                "\n" + "button_height: \"" + ButtonHeight + "\"," +
                "\n" + "button_placeholder_id: \"" + spanButtonPlaceHolder.ClientID + "\"," +
                //"\n" + "button_text: '" + ButtonText + "'," +
                //"\n" + "button_text_style: \"" + ButtonTextStyle + "\"," +
                //"\n" + "button_text_left_padding: " + ButtonTextLeftPadding + "," +
                //"\n" + "button_text_top_padding: " + ButtonTextTopPadding + "," +

                // The event handler functions are defined in handlers.js
                "\n" + "file_queued_handler: fileQueued," +
                "\n" + "file_queue_error_handler: fileQueueError," +
                "\n" + "file_dialog_complete_handler: fileDialogComplete," +
                "\n" + "upload_start_handler: uploadStart," +
                "\n" + "upload_progress_handler: uploadProgress," +
                "\n" + "upload_error_handler: uploadError," +
                "\n" + "upload_success_handler: uploadSuccess," +
                "\n" + "upload_complete_handler: uploadComplete," +
                "\n" + "upload_cancel_handler: uploadCancel," +
                "\n" + "queue_complete_handler: queueComplete, // Queue plugin event" +
                "\n" + GetApplicationUploadComplete() +

                "\n" + "files_names_hidden_id: \"" + hdnFilesName.ClientID + "\"," +
                "\n" + "status_placeholder_id: \"" + divStatus.ClientID + "\"" +
                "\n" + "};" +
                "\n" + this.SWFClientID + " = new SWFUpload(settings);" +
                "\n" + "refreshNumber(" + this.SWFClientID + ".settings);" +
                "\n" + "</script>";

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), this.ClientID, scriptFlash, false);

            base.OnPreRender(e);
        }
        #endregion