title: C# return linq result as a list from a wcf service method then use it in aspx web forms page
body: <p>I'm a newbie in C# 
  I'm trying to use a wcf service application which references a data entity model to select a row from a table.Searching s.o. I found a way to return linq query results as a list though I haven't found a way yet to use the list in my aspx web forms page.I don't know how to load the list in the aspx page and so far my research in msdn hasn't helped me.
  I tried to express my problem the best way I could so you would understand, here is my code:</p>
  
  <p>the wcf service application code:</p>
  
  <pre><code>public List&lt;string&gt; getAccountInfo(int uid)
      {
  
          List&lt;string&gt; result = new List&lt;string&gt;();
  
          try
          {
  
              using (paragon_db_Models.user_accounts_Model context = new paragon_db_Models.user_accounts_Model())
              {
  
                  var query = from uacc in context.user_accounts
                              where uacc.user_account_id == uid
                              select uacc;
  
                  foreach (var c in query)
                  {
                      string row = c.user_account_id + ";" + c.order_id + ";" + c.order_state + ";" + c.estimated_cost + ";" + c.instance_form + ";" + c.time_scedule + ";" + c.invoice + ";" + c.notification + ";" + c.user_account_type + ";" + c.username + ";" + c.password;
                      result.Add(row);
                  }
  
              }
              return result;
          }
          catch (Exception) 
          {
              return result;
          }
      }
  </code></pre>
  
  <p>the aspx.cs code</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
      {
          accountInfo_Ref.IaccountInfoSrvcClient accInfoClient = new    accountInfo_Ref.IaccountInfoSrvcClient();
  
          int id = (int)Session["UserId"];
  
          List&lt;string&gt; columns = new List&lt;string&gt;(accInfoClient.getAccountInfo(id));
  
          id_lbl.Text = columns[0];
          order_id_lbl.Text = columns[1];
      }
  </code></pre>
  
  <p>The service works fine. I'm also open to suggestions to better ways to do this.</p>