Version

RenderHtmlAtIndex Method

Renders html to the writer which will be passed to the client.
Syntax
'Declaration
 
Function RenderHtmlAtIndex( _
   ByVal writer As HtmlTextWriter, _
   ByVal index As Integer _
) As String
string RenderHtmlAtIndex( 
   HtmlTextWriter writer,
   int index
)

Parameters

writer
Response stream to write html. It can be html that is used to update content of control on client.
index
Index of html starting from 0. If control renders only a single html, then it should return html when (index==0) and return null when (index==1).

If control like UltraWebTab implements GetNumberOfHtmls, then at index -1 it should return its eval expression.

Return Value

UniqueID, key, index of rendering item, eval-expression, etc. which can be used by doResponse on the client to identify upcoming html.

The WebAsyncRefreshPanel at index 0 returns its UniqueID. For other values of the index it returns values from linked renderers or flags for external WebControls. The WebTextEdit returns the eval-expression similar to igedit_getById(UniqueID). The UltraWebTab implements GetNumberOfHtmls. At index -1 it returns the eval-expression similar to igtab_getTabById(UniqueID), for all other indexes it returns IndexOfTab.

Remarks

This method is called in an endless loop with incremented values of the index parameter, until the Control returns null.

The rendered html and returned string are passed back to the doResponse javascript function implemented by the Control on the client as pairs of elements in an array.

For example, if the Control will write "hello" at (index==0) and return "first", write "privet" at (index==1) and return "second", and return null at (index==2), then the doResponse on the client will have the following array of strings: ["first","hello","second","privet"]

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also