Share via


RenderListBoxFromArray - 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. It serves as a wrapper for the function RenderListBox, hardcoding the iSource parameter to the constant ARRAY_COLLECTION, and passing through all other parameters as is.

Definition

Function RenderListBoxFromArray(
  byVal sName,
  arrItemNames,
  arrItemValues,
  byVal sSelectedOption,
  byVal iSize,
  byVal bMultiple,
  byVal sAttList)

Parameters

  • sName
    A string containing a value to be assigned to the NAME attribute.
  • arrItemNames
    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.
  • arrItemValues
    An array that contains the values of the selection choices, used as the values assigned to the VALUE attributes of the corresponding OPTION elements.
  • 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

RenderListBox

Called By

ShowRefinedSearch

Remarks

The pair of arrays specified by the colItemNames and colItemValues parameters must each have the same number items.

Copyright © 2005 Microsoft Corporation.
All rights reserved.