title: Need to display ID in label on selecting value in autocomplete Textbox
body: <p>I have the <em>AutoCompleteExtender</em> that autocompletes <em>tbDrugName</em>. So far, it pulls <em>DrugIds</em> from my database.
  What I want is for it to autocomplete <em>DrugNames</em> and on selection, display <em>DrugId</em> in a <em>lbllist</em> label next to it.</p>
  
  <p><img src="https://i.stack.imgur.com/pNukU.png" alt="enter image description here"></p>
  
  <p>This is my cs code:</p>
  
  <pre><code>[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
  public static List&lt;string&gt; GetDrugNames(string prefixText, int count, string contextKey)
  {
  
      SqlConnection sc1 = new SqlConnection();
      sc1.ConnectionString = "Data Source=localhost;Initial Catalog=Drug;Integrated Security=True";
      sc1.Open();
      /*Opens connection to drugTable and does string matching*/
      SqlCommand getdrugnames = new SqlCommand("Select * from DrugTable where DrugID like @Name+'%'", sc1);
      getdrugnames.Parameters.AddWithValue("@Name", prefixText);
      List&lt;string&gt; DrugNames = new List&lt;string&gt;();
      using (SqlDataReader sdr = getdrugnames.ExecuteReader())
      {
          while (sdr.Read())
          {
              string item = AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(sdr["DrugID"].ToString(), sdr["DrugName"].ToString());
              //item.drugid, item.drugname
              DrugNames.Add(item);
              //DrugNames has list objects
          }
      }   
  
      return DrugNames;
  }
  </code></pre>
  
  <p>This is my aspx code:</p>
  
  <pre><code>&lt;ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"&gt;
  &lt;/ajaxToolkit:ToolkitScriptManager&gt;
  &lt;asp:TextBox ID="tbDrugName" runat="server" &gt;&lt;/asp:TextBox&gt;
  &lt;ajaxToolkit:AutoCompleteExtender 
              ID="AutoCompleteDrugID" runat="server" 
              TargetControlID="tbDrugName" 
              ServiceMethod="GetDrugNames"
              MinimumPrefixLength="1" 
              CompletionInterval="200" 
              UseContextKey="True"  
              &gt;
  
      &lt;/ajaxToolkit:AutoCompleteExtender&gt;    
  &lt;/ajaxToolkit:AutoCompleteExtender&gt;
  
  &lt;asp:Label ID="lbllist" runat="server" Text="Label"&gt;&lt;/asp:Label&gt;
  &lt;/td&gt;
  </code></pre>