I have an object that looks like this:
public class TestData { public string FirstName {get; set;} public string LastName {get; set;} public string Email {get; set;} public string Phone {get; set;} }
I have 10 instances of this class stored in IENumerable .
I also have a GridView in my aspx file:
<asp:GridView ID="GridView1" runat="server"> </asp:GridView>
I need a way to display IENumerable content in a GridView . But I want to be able to set "headers" in thead tables.
So, I get something like this:
<table> <thead> <th>Firstname</th> <th>Firstname</th> <th>Telephone</th> <th>Email address</th> </thead> <tbody> </tbody> </table>
Can I do this with a GridView or is it better to use some other control for the job? Do I also remember something about Templating? Not sure, I'm pretty new to ASP.NET.
source share