| |||||||
HtmlInputControl.Value PropertySystem.Web.UI.HtmlControls Namespace HtmlInputControl Class Sets or retrieves the value associated with the HtmlInputControl. Syntax
Property Value
The property is read/write with a default value that depends on the type of control. RemarksUse this property to specify or determine the value associated with the HtmlInputControl. Value depends on the type of control.
All other input controls have no default value. To be submitted with the data associated with a <form>, each of the form input controls must be assigned a Name and have a valid Value. Only controls with a valid name/value pair are sent with the HTTP Request message to the receiving program for processing. These name/value pairs are then accessible on the server via the Request.Params, Request.Form, or Request.QueryString collections. ExampleThe below code shows how to declaratively set the values associated with HtmlInputRadioButton controls at design time, and how these values are used by a submit handler at run time. <p>Choose what suits you: <br>
<input type=radio id="cool" runat=server
value="background:navy; color:lime">Cool
<input type=radio id="soso" runat=server
value="background:gainsboro; color:dimgray">So-So
<input type=radio id="warm" runat=server
value="background:maroon; color:gold">Warm
This example retrieves the values of input controls submitted with a form using POST, by looping thru the Request.Form collection. This example retrieves the values of input controls submitted with a form using GET, by looping thru the Request.QueryString collection. See Also |
| ||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme