anjali khan

anjali khan

  • NA
  • 293
  • 66k

how to display the data in listview using sql db in asp.net?

Jul 18 2015 2:24 AM
hi friend,
 
I m sending design page so how to use sql in this design page and display the data..
 

<div style="width:100%; background-color:Silver">

<asp:ListView ID="lvCustomers" runat="server" GroupPlaceholderID="groupPlaceHolder1"

ItemPlaceholderID="itemPlaceHolder1">

<LayoutTemplate>

<table style="text-align:center; width:100%">

<tr>

<th>

item_Id

</th>

<th>

item_Name

</th>

<th>

item_Group

</th>

</tr>

<asp:PlaceHolder runat="server" ID="groupPlaceHolder1"></asp:PlaceHolder>

<tr>

<td colspan="3">

<asp:DataPager ID="DataPager1" runat="server" PagedControlID="lvCustomers" PageSize="10">

<Fields>

<asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="false" ShowPreviousPageButton="true"

ShowNextPageButton="false" />

<asp:NumericPagerField ButtonType="Link" />

<asp:NextPreviousPagerField ButtonType="Link" ShowNextPageButton="true" ShowLastPageButton="false"

ShowPreviousPageButton="false" />

</Fields>

</asp:DataPager>

</td>

</tr>

</table>

</LayoutTemplate>

<GroupTemplate>

<tr>

<asp:PlaceHolder runat="server" ID="itemPlaceHolder1"></asp:PlaceHolder>

</tr>

</GroupTemplate>

<ItemTemplate>

<td>

<%# Eval("item_Id")%>

</td>

<td>

<%# Eval("item_Name")%>

</td>

<td>

<%# Eval("item_Group")%>

</td>

</ItemTemplate>

</asp:ListView>

</div>


Answers (2)