Simple controls:
Label: The tag control is used to display text information that gets or sets the text that is displayed on the label control.
Property:
Text: Gets or sets the textual content of the control.
Font: Gets or sets the text font of the control.
ForeColor: Gets or sets the color of the text in the control.
BorderColor: Gets or sets the border color of the control.
BorderStyle: Gets or sets the border style of the control.
<asp:label id="Label4" runat="server" text= " Label "></asp:Label>
Literal: None of the elements, only the location of the text content is fully displayed.
TextBox: Text Box control
Property:
TextMode-It sets why values are compiled and will be different for some form elements
: Singleline,multiline,password. corresponding to the text box single line, multiple lines, and Password box form.
Button controls:
Button
ImageButton Picture button
LinkButton display a hyperlink-style button
The OnClientClick of the button is the Execution client script (JS), the client execution priority is higher than the server
Form elements:
12 Elements of a form
Text class:
<input type= "Text"/>-text box OK
<input type= "password"/>-Password box ok
<textarea></textarea>-Text field OK
<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= ""/>
Select class:
<input type= "Radio"/>
<input type= "checkbox"/>
<select>
<option></option>
</select>
<input type= "File"/>
Composite controls:
RadioButton Multi-Select button
Property:
Checked: Gets whether the control is selected
GroupName: Gets or sets the group name that the radio button belongs to
TextAlign: Setting the alignment of text in a control
RadioButtonList single-selection group control
Property:
Items: Get a collection of list items
RepeatDirection: How radio buttons are arranged, horizontal and vertical are arranged horizontally and vertically, respectively
Repeatdcolumns: Gets or sets the number of columns to display in the control
RepeatLayout: Radio box selection, table and flow are displayed in tables and streams respectively
DataSource: Binding Data source
DataTextField: Data text field displayed in a radio box
DataValueField: Data value field displayed in a radio box
SelectedItem: Gets or sets the selected item with the smallest index
Selectindex: Gets or sets the index of the selected item
Selectvalue: Gets or sets the value of the selected item in the space
Two ways to insert data
if (! <Nation> list = new Nationdata (). Select (); Radiobuttonlist1.datasource = list; Radiobuttonlist1.datatextfield = ; Radiobuttonlist1.datavaluefield = ; Radiobuttonlist1.databind ();
foreach inch list) { new ListItem (N.nationname, n.nationname); RadioButtonList1.Items.Add (li); }
RadioButtonList and DropDownList almost
Checkboxlist:listbox
First, data binding
Traverse data collection, ListItem
Second, set the default check
To judge when data is added, set the selected property
Third, to take the value
Iterate through all the items and decide if they are selected then remove the values to save
Four, the layout
WebForm simple controls and composite controls