title: Returning Multiple Row from Webservice
body: <p>I have a webservice, it doesnt error but give me only one row of data</p>
  
  <pre><code>    using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Services;
  using System.Configuration;
  using System.Data;
  using System.Data.SqlClient;
  using System.Web.Script.Serialization;
  
  
  namespace nikitaweb
  {
      /// &lt;summary&gt;
      /// Summary description for nikitaws
      /// &lt;/summary&gt;
      [WebService(Namespace = "http://ijportal.kemenkeu.go.id/")]
      [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
      [System.ComponentModel.ToolboxItem(false)]
      // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
      [System.Web.Script.Services.ScriptService]
      public class nikitaws : System.Web.Services.WebService
      {
  
  
          public class Stndlist
          {
              public string nond { get; set; }
              public string nost { get; set; }
              public string tglst { get; set; }
              public string halst { get; set; }
          }
  
      [WebMethod]
      public Stndlist GetStnd()
      {
          string CS = ConfigurationManager.ConnectionStrings["nikita_cs"].ConnectionString;
          List&lt;Stndlist&gt; Stndlists = new List&lt;Stndlist&gt;();
          using (SqlConnection con = new SqlConnection(CS))
          {
              Stndlist daftarstnd = new Stndlist();
              SqlCommand da = new SqlCommand("xp_TampilStNd", con);
              da.CommandType = CommandType.StoredProcedure;
              con.Open();
              SqlDataReader rdr = da.ExecuteReader();
              while (rdr.Read())
              {
                  daftarstnd.nond = rdr["nond"].ToString();
                  daftarstnd.nost = rdr["nost"].ToString();
                  daftarstnd.tglst = rdr["tglst"].ToString();
                  daftarstnd.halst = rdr["halst"].ToString();
                  Stndlists.Add(daftarstnd);
              }
  
              //JavaScriptSerializer js = new JavaScriptSerializer();
              //Context.Response.Write(js.Serialize(daftarstnd));
              return daftarstnd;
  
          }
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>When i run the webservice only give me one row</p>
  
  <pre><code>&lt;Stndlist&gt;
  &lt;nond&gt;ND-(002)/PP.42/2013&lt;/nond&gt;
  &lt;nost&gt;ST-(005)/PP/2013&lt;/nost&gt;
  &lt;tglst&gt;11/26/2013 12:00:00 AM&lt;/tglst&gt;
  &lt;halst&gt;Usulan Tugas Benchmarking ke Bandung&lt;/halst&gt;
  &lt;/Stndlist&gt;
  </code></pre>
  
  <p>My objective is to return all row in my sql server database.
  Can you tell me how can i modify this code?
  Thank you.</p>