Webform repeater, webformrepeater
Repeater: composed of templates. After parsing, the template does not exist.
You must specify a data source for data binding.
List <Fruit> list = new FruitDA (). Select (); // data query (any search)
Repeater1.DataSource = list; // value assignment
Repeater1.DataBind (); // bind
Template style:
Headertemplate: Header Template
When displaying data, it is equivalent to the header
Itemtemplate
<% # Eval ("data column name") %> bind data directly based on the column name
Alternatingtemplate: Double loading of alternate item templates
And itemtemplate to achieve alternate display.
Footertemplate: Bottom Template
Style needs to be constructed by spelling hmtl format
The dialog box is displayed. Confirm to cancel the operation.
DialogResult result = new MessageBox. Show ("delete? "," Delete dialog box ", MessageBoxButtons. YseNo); // (display content, Dialog Box Name, system included)
If (result = DialogResult. Yes) // determines whether the user points are confirmed or canceled.
{// Enter the statement to be executed
}