how to display all records of table in formview control in asp.net -
table rollno name 101 xyz 102 abc
with following code m able display first row of table 101 xyz
rollno: '>
name: '>
how display next row of table
102 abc
i using bind formview.
<itemtemplate> rollno: <asp:label id="itemlabel" runat="server" text='<%# bind("rollno") %>'></asp:label><br /> name: <asp:label id="imagelabel" runat="server" text='<%# bind("name") %>'></asp:label> </itemtemplate>
you can use following itemtemplate
make next row in new line.
<itemtemplate> <div> rollno: <asp:label id="itemlabel" runat="server" text='<%# bind("rollno") %>'></asp:label> name: <asp:label id="imagelabel" runat="server" text='<%# bind("name") %>'> </asp:label> </div> </itemtemplate>
to next row, need bind ienumerable type of datasource formview ,
- get result in list of objects bind formview
- get result datatable ( make sure have multiple rows) , bind
formview
Comments
Post a Comment