Here we will talk about binding data to the list first. Repeater, datalist.
Data Binding on the WebProgramIs mainly used to store and retrieve dynamic data sources. Through data binding, Asp.net can easily display and modify data in Web applications. Many server controls
Both support data binding, such as label and textbox.
The simplified data model and two-way binding allow you to modify or read data. Supports access to business objects in the middle layer. Is a feature of the ASP. net2.0 data model!
The binding syntax between server control attributes and data sources is as follows:
<Tagprefix: tagname property = "<% # data-binding expression %>" runat = "server"/> or
Literal text <% # data-binding expression %>
All data binding expressions must be between <% # And %> characters.
The databind () method must be called during use! The databind method web forms and controls trigger the databinding event. You can also independently call the databind method!
I directly send an emailCodePicture ready:
This is the repeater usage!
Next we will talk about the usage of datalist:
Now, let's introduce so much today! Hope you can talk to me a lot! Due to limited levels, errors are inevitable! Please point out the progress!