CodeCharge Studio
Value Run-Time Property (ASP)
Applies to
Label Control,
TextBox Control,
TextArea Control,
Checkbox Control,
Image Control,
ImageLink Control,
DatePicker Form,
Hidden Control,
ListBox Control,
CheckboxList Control,
RadioButton Control,
FileUpload Control
Type
variant
Access
read/write
Syntax
object.Value [=value]
Description
Holds the raw value of the control. When written, converts the new value to the data type corresponding to the DataType property. For ccsDate, ccsBoolean, ccsInteger, ccsFloat, ccsText and ccsMemo in ASP, the following VBScript conversion functions are used repectively: CDate, CBool, CLng, CDbl, CStr. Since the checkbox control (ControlType = ccsCheckBox) value is stored in the State variable, special processing is required for this type of control. The checkbox control may store only one of two values defined in CheckedValue and UncheckedValue properties. Any value assigned to the checkbox control that does not match the CheckedValue property is automatically converted to the UncheckedValue value.
Example
This example shows the code placed in the BeforeShowRow event procedure that forces the grid field (income
) to display the sum of all fields' values before the currently processed one (including the current one). The sum
variable must be declared and initialized as a global variable at the beginning of the script module.
Function freport_BeforeShowRow()
sum = sum + freport.income.Value
freport.income.Value = sum
End Function
See also
Link property
Related Examples
Displaying Output
Add Custom HTML to a Page
Change Control Value
Changing Table Cell Color
Create a Grid Column with a Calculated Value
On-line, printable versions and updates