1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| public partial class Test3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
var personnes = new List<Personne>
{
new Personne{ Nom="Nom1", Prenom="Prenom1"},
new Personne{ Nom="Nom2", Prenom="Prenom2"},
new Personne{ Nom="Nom3", Prenom="Prenom3"},
new Personne{ Nom="Nom4", Prenom="Prenom4"},
new Personne{ Nom="Nom5", Prenom="Prenom5"},
new Personne{ Nom="Nom6", Prenom="Prenom6"},
new Personne{ Nom="Nom7", Prenom="Prenom7"}
};
rptTest.DataSource = personnes;
rptTest.DataBind();
}
}
public class Personne
{
public string Nom { get; set; }
public string Prenom { get; set; }
} |
Partager