title: How to pass List<> to Javascript and display in combobox c#
body: <p>I have a List that store some records that filtered from database.
  I have no idea on Javascript. Is anyone can teach me on how to pass the List to Javascript and display it in combo box?
  P/S: I want the combobox text field to store Name (allow user to see) and the value field to store nameId (hidden from user). </p>
  
  <p>My c# code behind is as follow:</p>
  
  <pre><code>public static List&lt;bllControls&gt; getPropertyTypeByPhaseId(int prmPhaseId)
  {
      bllControls clsControls = new bllControls();
      List&lt;bllControls&gt; lstControls = new List&lt;bllControls&gt;();
      lstControls = clsControls.PropertyTypeSource(prmPhaseId);
  
      return lstControls;
  }
  </code></pre>
  
  <p>While my Javascript code is as follow:</p>
  
  <pre><code>function onSelectedPhase(comboPhase) {
          var phaseId = comboPhase.GetValue();
          PageMethods.getPropertyTypeByPhaseId(phaseId, onSuccess, onFailed);
          function onSuccess(oaCompProj) {
              //here should loop the List and then store in combobox
          }
          function onFailed(oaCompProj) { alert('Failed to get Company and Project info'); }
      }
  </code></pre>
  
  <p>my combobox id is ddlProperty.</p>