Click here to Skip to main content
15,896,915 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
hai,

i want to bind listview using json,bind data in clientside

XML
<%--<asp:ListView ID="LVperticular" runat="server"
                    >
 <LayoutTemplate>
            <table runat=" server" id=" table1">
              <tr runat=" server" id=" groupPlaceholder">                               
              </tr>
            </table>
        </LayoutTemplate>
          <ItemTemplate>
              <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/arrowlinkbutton.gif" Width="10px"  Height="10px"  />

            <asp:Label ID="lblParticular" runat="server" Text='<%#Bind("Particulars") %>' CssClass="lvParticulars"></asp:Label>

            <asp:Label ID="lblQuantity" runat="server" Text='<%# Bind("CurrentQuantity") %>' CssClass="lvCurrentQuantity" Font-Bold="True" Font-Size="Smaller"  ForeColor="Red"></asp:Label><br /><br />

            </ItemTemplate>
    </asp:ListView>--%>


in server side return data in xml format
this is my web method


public static string ButtonOkStockTransfer(string StockId)
{


DataTable dtSession = (DataTable)System.Web.HttpContext.Current.Session["OutStockTransfer"];

bl_T_StockTransfer objOut = new bl_T_StockTransfer();
objOut.companyId = Convert.ToInt64(System.Web.HttpContext.Current.Session["CompanyId"].ToString());
objOut.financialId = Convert.ToInt64(System.Web.HttpContext.Current.Session["FinancialId"].ToString());
objOut.branchId = Convert.ToInt64(System.Web.HttpContext.Current.Session["BranchId"].ToString());
objOut.stockId = Convert.ToInt64(StockId);
DataSet dtOut = objOut.get_StockDetails(StockId);
dtOut.Tables[0].TableName = "TransferStock";




return dtOut.GetXml();
}

pls help me,these xml data i want to bind my listview
Posted
Updated 27-Aug-13 0:00am
v5
Comments
Which techology? .NET or Java? Please tag and post some code for reference.
athira Paramesh 27-Aug-13 4:54am    
using .net

1 solution

Here is the Example explains how to bind data to grid view using json and jquey hope this example helps you to bind data to List view

Bind data to gridview with JQuery or JSON in asp.net[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900