HTML form
Text class:
<input type= "Text"/>-text box
<input type= "password"/>-Password box
<textarea></textarea>-Text fields
<input type= "hidden"/>-hidden fields
Button class:
<input type= "button" value= "Pushbutton 1"/>
<input type= "Submit" value= "Submission"/>
<input type= "reset" value= "reset"/>
<input type= "image" src= ""/>
File class:
<input type= "Radio"/> <input type= "checkbox"/>
<select>
<option></option>
</select>
Data binding between composite controls, setting default check items, taking values
Radionbuttonlist and DropDownList:
Data binding-datasource
For example: list<nation> List = new Nationdata (). Select ();
RadioButtonList1. DataSource = list;
RadioButtonList1. DataTextField = "Nationname";
RadioButtonList1. DataValueField = "Nationcode";
RadioButtonList1. DataBind ();
Set the default check
Change 1.selectedindex-Index
2,selectedvalue-value
Take value
SelectedItem
Depending on the value of the binding of the control, it can query the data to which the data value can be queried, that is, if the data is a text query, that is, the SelectedItem. Selectvalue.
CheckBoxList and ListBox:
Data binding-traversing data collection (***iteam)
Set default check-judge when data is added, set selected property
Value-iterates through all the items, judging if it is selected then remove the value to save
C#webform controls