C# Class Argentini.Halide.H3Controls

The H3Controls class contains methods and properties for more easily manipulating server-side controls. For example, the "SelectedListItems" method allows for a simple way of retrieving a delimitted list of selected values from a ListControl (like a CheckBoxList).
Datei anzeigen Open project: argentini/Halide

Public Methods

Method Description
AnyChecked ( CheckBoxList listObject ) : System.Boolean

Determine if at least one ListItem is selected.

IsSelected ( ListControl listObject, String itemValue ) : System.Boolean

Determine by value if a specific ListControl ListItem is selected. Evaluations are case-insensitive. using Argentini.Halide; ... if (H3Controls.IsSelected(CheckBoxList1, "red")) { ... }

IsSelected ( ListControl listObject, String itemValue, System.Boolean ignoreCase ) : System.Boolean

Determine by value if a specific ListControl ListItem is selected. using Argentini.Halide; ... if (H3Controls.IsSelected(CheckBoxList1, "red", true)) { ... }

SelectedListItems ( ListControl listObject ) : String

Find all selected ListItem objects in a List Control object (e.g. CheckBoxList) and return a delimitted string of the selected values. The following example could yield a result like "red,blue,green". using Argentini.Halide; ... String values = H3Controls.SelectedListItems(CheckBoxList1);

SelectedListItems ( ListControl listObject, System.Boolean surround ) : String

Find all selected ListItem objects in a List Control object (e.g. CheckBoxList) and return a delimitted string of the selected values. The following example could yield a result like ",red,blue,green,". using Argentini.Halide; ... String values = H3Controls.SelectedListItems(CheckBoxList1, true);

SelectedListItems ( ListControl listObject, String delimitter ) : String

Find all selected ListItem objects in a List Control object (e.g. CheckBoxList) and return a delimitted string of the selected values. The following example could yield a result like "red|blue|green". using Argentini.Halide; ... String values = H3Controls.SelectedListItems(CheckBoxList1, "|");

SelectedListItems ( ListControl listObject, String delimitter, System.Boolean surround ) : String

Find all selected ListItem objects in a List Control object (e.g. CheckBoxList) and return a delimitted string of the selected values. The following example could yield a result like ",red,blue,green,". using Argentini.Halide; ... String values = H3Controls.SelectedListItems(CheckBoxList1, ",", true); The following example could yield a result like "red|blue|green". using Argentini.Halide; ... String values = H3Controls.SelectedListItems(CheckBoxList1, "|", false);

Private Methods

Method Description
H3Controls ( ) : System

Method Details

AnyChecked() public static method

Determine if at least one ListItem is selected.
public static AnyChecked ( CheckBoxList listObject ) : System.Boolean
listObject System.Web.UI.WebControls.CheckBoxList List Control (like a CheckBoxList).
return System.Boolean

IsSelected() public static method

Determine by value if a specific ListControl ListItem is selected. Evaluations are case-insensitive. using Argentini.Halide; ... if (H3Controls.IsSelected(CheckBoxList1, "red")) { ... }
public static IsSelected ( ListControl listObject, String itemValue ) : System.Boolean
listObject System.Web.UI.WebControls.ListControl List Control (like a CheckBoxList).
itemValue String ListItem value which should be evaluated to determine if it is selected or not.
return System.Boolean

IsSelected() public static method

Determine by value if a specific ListControl ListItem is selected. using Argentini.Halide; ... if (H3Controls.IsSelected(CheckBoxList1, "red", true)) { ... }
public static IsSelected ( ListControl listObject, String itemValue, System.Boolean ignoreCase ) : System.Boolean
listObject System.Web.UI.WebControls.ListControl List Control (like a CheckBoxList).
itemValue String ListItem value which should be evaluated to determine if it is selected or not.
ignoreCase System.Boolean Set to true if case shuld be ignored.
return System.Boolean

SelectedListItems() public static method

Find all selected ListItem objects in a List Control object (e.g. CheckBoxList) and return a delimitted string of the selected values. The following example could yield a result like "red,blue,green". using Argentini.Halide; ... String values = H3Controls.SelectedListItems(CheckBoxList1);
public static SelectedListItems ( ListControl listObject ) : String
listObject System.Web.UI.WebControls.ListControl List Control (like a CheckBoxList).
return String

SelectedListItems() public static method

Find all selected ListItem objects in a List Control object (e.g. CheckBoxList) and return a delimitted string of the selected values. The following example could yield a result like ",red,blue,green,". using Argentini.Halide; ... String values = H3Controls.SelectedListItems(CheckBoxList1, true);
public static SelectedListItems ( ListControl listObject, System.Boolean surround ) : String
listObject System.Web.UI.WebControls.ListControl List Control (like a CheckBoxList).
surround System.Boolean Surround the retruned string with the delimitter string.
return String

SelectedListItems() public static method

Find all selected ListItem objects in a List Control object (e.g. CheckBoxList) and return a delimitted string of the selected values. The following example could yield a result like "red|blue|green". using Argentini.Halide; ... String values = H3Controls.SelectedListItems(CheckBoxList1, "|");
public static SelectedListItems ( ListControl listObject, String delimitter ) : String
listObject System.Web.UI.WebControls.ListControl List Control (like a CheckBoxList).
delimitter String Character(s) to use when delimitting the values.
return String

SelectedListItems() public static method

Find all selected ListItem objects in a List Control object (e.g. CheckBoxList) and return a delimitted string of the selected values. The following example could yield a result like ",red,blue,green,". using Argentini.Halide; ... String values = H3Controls.SelectedListItems(CheckBoxList1, ",", true); The following example could yield a result like "red|blue|green". using Argentini.Halide; ... String values = H3Controls.SelectedListItems(CheckBoxList1, "|", false);
public static SelectedListItems ( ListControl listObject, String delimitter, System.Boolean surround ) : String
listObject System.Web.UI.WebControls.ListControl List Control (like a CheckBoxList).
delimitter String Character(s) to use when delimitting the values.
surround System.Boolean Surround the retruned string with the delimitter string.
return String