Skip to content
Loading
Clientside inserting of repeater using json ??
  1. function Bind(response) {  
  2.         var table = $("#dvCustomers table").eq(0).clone(true);  
  3.         var customers = response.d;  
  4.         $("#dvCustomers table").eq(0).remove();  
  5.         $(customers).each(function () {  
  6.             $(".name", table).html(this.ContactName);  
  7.             $(".city", table).html(this.City);  
  8.             $(".postal", table).html(this.PostalCode);  
  9.             $(".country", table).html(this.Country);  
  10.             $(".phone", table).html(this.Phone);  
  11.             $(".fax", table).html(this.Fax);  
  12.             $("#dvCustomers").append(table).append("");  
  13.             table = $("#dvCustomers table").eq(0).clone(true);  
  14.         });  
  15.     } 
 
  • Kiran Mohanty
    Hi, this code may help you.
    1. string json="your json data";  
    2. Rootobject _objRoot = JsonConvert.DeserializeObject(json);  
    3. Repeater1.DataSource = GetDataTableFromObjects(_objRoot.root);  
    4. Repeater1.DataBind();