Class DeferredScripts
Represents a WebForms control that renders deferred JavaScript initialization scripts for HTML5 ReportViewer components. Used to collect and output JavaScript initialization code at a specific location in the HTML document for optimal performance and loading behavior.
Inheritance
Namespace: Telerik.ReportViewer.Html5.WebForms
Assembly: Telerik.ReportViewer.Html5.WebForms.dll
Syntax
public class DeferredScripts : WebControl
Remarks
Provides a way to defer script execution until a controlled point in the page rendering process, improving page load performance by separating script registration from script execution.
Constructors
DeferredScripts()
Declaration
public DeferredScripts()
Methods
Render(HtmlTextWriter)
Renders the control content by outputting the deferred JavaScript scripts to the specified HTML writer.
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
|
System.Web.UI.HtmlTextWriter
writer
The HtmlTextWriter object that receives the control output for rendering on the client. |
Remarks
Overrides the base render method to provide custom script output without additional HTML wrapper elements.
RenderContents(HtmlTextWriter)
Renders the JavaScript content of the control by writing the deferred scripts to the specified HTML writer.
Declaration
protected override void RenderContents(HtmlTextWriter output)
Parameters
|
System.Web.UI.HtmlTextWriter
output
The HtmlTextWriter object that receives the JavaScript initialization scripts for output to the client. |
Remarks
Retrieves and renders all deferred JavaScript scripts that have been collected during the page lifecycle for HTML5 ReportViewer components.
ToString()
Converts the deferred scripts collection into an HTML string containing the JavaScript initialization statements.
Declaration
public override string ToString()
Returns
|
System.String
An HTML string containing all deferred JavaScript scripts with script tags for HTML5 ReportViewer initialization. |
Remarks
Retrieves all scripts that were stashed during the page lifecycle and formats them as HTML script elements for execution in the browser.