title: jQuery autocomplete select event
body: <pre><code>&lt;script&gt;
   var ArrayString;
    $(function () {
        ArrayString = &lt;%=GetInstitutionsArray() %&gt;;
  
        $("#tags").autocomplete({
            source: ArrayString,
             select: function( event, ui ) {
             $("#Label1").val(ui.ID);
            }
        });
  
    });
  </code></pre>
  
  <p>
  I am using this jquery for creating an autocomplete list.. <code>GetInstitutionsArray()</code> is a function in the code behind that creates an object array that looks like this ..</p>
  
  <pre><code> ArrayString = [{label: "Centre of Professional Training Sezimovo st",ID:9695},
   {label: "Kunshan Industrial Technology Research Institute",ID:10079},
   {label: "Gh Asachi Technical University of Iasi",ID:10186},
   {label: "KAZDIDAKTIK Ltd",ID:9427},
   {label: "3D Perception AS",ID:7796},
   {label: "A D PatelInstitute of Technology",ID:7390},
   {label: "A Star Singapore BioImaging Consortium",ID:8706},
   {label: "A James Clark School of Engineering",ID:9005},
   {label: "ADPatel Institute of Technology",ID:9151},
   {label: "AM AlKhorafi",ID:7296},
   {label: "AAI Corporation",ID:7795}];
  </code></pre>
  
  <p>I am trying to put the Id of the institution's ID in a label <code>Label1</code> when a label is chosen.. </p>
  
  <pre><code>&lt;asp:Label ID="Label1" runat="server"&gt;&lt;/asp:Label&gt;
  </code></pre>
  
  <p>The id isn't showing on a select</p>