Click or drag to resize

PdfWebControlLiteOnClientLoad Property

Gets or sets a value indicating a client side script to execute on load.

Namespace:  RadPdf.Web.UI
Assembly:  RadPdf (in RadPdf.dll) Version: 3.47.0.0 (3.47.0.0)
Syntax
public string OnClientLoad { get; set; }

Property Value

Type: String
JavaScript to execute on PdfWebControlLite load.
Remarks

Use of this in this statement will refer to a Client API instance of the PdfWebControlApi.

Using this property will cause RAD PDF to render inline JavaScript. To avoid inline scripting (e.g. to comply with a CSP (Content Security Policy), add code similar to the below sample to your script file. (NOTE: Your script file must appear after the output of RenderHead.)

JavaScript
__RadPdfClientHandlerRegister("load", "uniqueID", function()
    {
        // Code to execute on document load ...
    });

where uniqueID is the UniqueID of a PdfWebControlLite instance. (NOTE: For ASP.NET Core / 5+, this is the same as the control's ID.)

See Also