value property
[This documentation is preliminary and is subject to change.]
Sets or retrieves the displayed value for the control object. This value is returned to the server when the control object is submitted.
Syntax
HRESULT value = object.put_value(BSTR v);HRESULT value = object.get_value(BSTR* p);
Property values
Type: BSTR
The value of a control object which is passed as a name/value
pair to the server, when the control object is submitted.
Standards information
- HTML 4.01 Specification, Section 17.4
Remarks
The purpose of the value property depends on the type of control as described in the following table.
input type=checkbox | The selected value. The control submits this value only if the user has selected the control. Otherwise, the control submits no value. |
input type=file | The value, a file name, typed by the user into the control. Unlike other controls, this value is read-only. |
input type=hidden | The value that the control submits when the form is submitted. |
input type=password | The default value. The control displays this value when it is first created and when the user clicks the reset button. |
input type=radio | The selected value. The control submits this value only if the user has selected the control. Otherwise, the control submits no value. |
input type=reset | The button label. If not set, the label defaults to Reset. |
input type=submit | The button label. If not set, the label defaults to Submit. |
input type=text | The default value. The control displays this value when it is first created and when the user clicks the reset button. |
The value property of the input type=file object returns only the file name and not the path of the file to machines outside the local machine security zone. For more information on security zones, see About URL Security Zones.
The initial setting of the value property is the initial display value for the control object. If the control object is reset using the IHTMLInputButtonElement interface, the initial value is restored.
Note Though the display text is hidden, data is passed to the server in clear text, and may be read by anyone with access to the network.
Build date: 1/26/2012