The WFPageControlsValueProvider class flattens page controls where a value can be provided into a dictionary of ID and control. Custom controls can implement IWFControlValue.
  • WFPageControlsValueProvider(Control page, string prefix)
Initializes a new instance of the WFPageControlsValueProvider class and uses the "page" object as the parent of all controls from which values will be derived. Uses WebControlUtilities.FlattenPageControls() method to create a flat dictionary of controls with values from the page. "prefix" is not used.
Interface Implementations
  • IWFValueProvider.ContainsKey(string keyname)
Returns a boolean representing if the page has any control matching an ID of "keyname". This test is case-sensitive.
  • IWFValueProvider.KeyValue(string keyName, object defaultValue)
Checks if the page has any control with case-sensitive matching of an ID "keyName". If the control is found and the value is not null/empty, the value will be returned using WebControlUtilities.GetControlValue(). Otherwise, "defaultValue" will be returned.
  • IWFValueProvider.KeyValue(string keyName)
Returns the control value with case-sensitive matching of an ID "keyName". An exception will be thrown if the control is not present.
  • IWFValueProvider.GetPropertyEnumerator()
Returns the collection of page control IDs as an enumerable of String.

Last edited May 21, 2012 at 8:01 PM by aikeru, version 1


No comments yet.