PreviewDraftButtonRenderHtml Method Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Renders the html code. This method is automatically called by the Invoke method. This method calls the RenderButtonOnClickCode(TextWriter) method that renders the java script code that invokes the dialog.

Namespace: ContentStudio.Site.ActiveScripting.Document
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

protected virtual void RenderHtml(
	TextWriter output
)

Parameters

output
Type: System.IOTextWriter
A TextWriter that writes the code that should be rendered to its underlying stream.
Remarks

Classes that inherit from this object can render their own html objects that displays the preview dialog via client side java script. Implementer should call the RenderButtonOnClickCode(TextWriter) method that renders the needed java script code that invokes the Content Studio preview dialog.
This is the standard implementation of this method
C#
output.Write("<button");
WriteAttribute(output, " type", "button");
WriteAttribute(output, " id", ButtonID);
//write the button class if specified.
if (!String.IsNullOrEmpty(CSSClassName))
    WriteAttribute(output, "class", CSSClassName);
//Write the start of the click event 
output.Write("onclick=\"");
//Write the evenhandler code 
RenderButtonOnClickCode(output);
//Write end of button element
output.Write("\" >");
//Write the button text
output.Write(Text);
//and end button element
output.Write("</button>");
See Also

Reference