RenderListBox - Solution Sites Routine

This function prepares the HTML that will render a SELECT element and its subordinate OPTION elements, populating the values for the various attributes and content based on the values supplied by the parameters.

Definition

Function RenderListBox(
  byVal iSource,
  byVal sName,
  colItemNames,
  colItemValues,
  byVal sSelectedOption,
  byVal iSize,
  byVal bMultiple,
  byVal sAttList)

Parameters

  • iSource
    A number that specifies the type of the colItemNames and colItemValues parameters. Legal values are the constants SIMPLELIST_COLLECTION, DICTIONARY_COLLECTION, and ARRAY_COLLECTION, each specifying the indicated type of collection.
  • sName
    A string containing a value to be assigned to the NAME attribute.
  • colItemNames
    A SimpleList object, a Dictionary object, or an array that contains the names of the selection choices that the user will see in the listbox, specified as content of the corresponding OPTION elements. The iSource parameter specifies the type of this parameter.
  • colItemValues
    A SimpleList object, a Dictionary object, or an array that contains the values of the selection choices, used as the values assigned to the VALUE attributes of the corresponding OPTION elements. The iSource parameter specifies the type of this parameter.
  • sSelectedOption
    A string that, if found to match one of the values supplied in the colItemValues parameter, results in the SELECTED attribute being present in the corresponding OPTION element.
  • iSize
    A number containing a value to be assigned to the SIZE attribute.
  • bMultiple
    A Boolean, which if set to True, results in the MULTIPLE attribute being present in the SELECT element.
  • sAttList
    A string containing any additional, space-separated "attribute=value" pairs to be included in the SELECT element. This string, if non-empty, must begin with a space character.

Return Value

A string containing the HTML that will render the specified listbox.

Defined in File

include\html_lib.asp

Routines Called

None.

Called By

RenderListBoxFromArray

RenderListBoxFromSimpleList

Remarks

The pair of SimpleList objects, Dictionary objects, or arrays specified by the colItemNames and colItemValues parameters must each have the same number items.

Copyright © 2005 Microsoft Corporation.
All rights reserved.