title: Posting the Values from a ComboBox ASP.Net
body: <p>I am trying to post values from an AjaxToolKit ComboBox using ASP.NET 4.0.</p>
  
  <p>Here is my code:</p>
  
  <p>WebForm1</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;body&gt;
      &lt;ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"&gt;
      &lt;/ajaxToolkit:ToolkitScriptManager&gt;
      &lt;div&gt;
          &lt;ajaxToolkit:ComboBox ID="ComboBox1" runat="server"&gt;
          &lt;/ajaxToolkit:ComboBox&gt;
          &lt;asp:Button ID="Button1" runat="server" Text="Button" UseSubmitBehavior="true" PostBackUrl="~/WebForm2.aspx" /&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>C#</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      for (int i = 0; i &lt; 5; i++)
      {
          ListItem tmpListItem = new ListItem("Item " + i.ToString());
          tmpListItem.Value = "Item " + i.ToString();
          ComboBox1.Items.Add(tmpListItem);
      }
  }
  </code></pre>
  
  <p>WebForm2</p>
  
  <p>C#</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      HttpContext tmpHttpContext = HttpContext.Current;
      string cmboBoxValue = tmpHttpContext.Request["ComboBox1"];
  }
  </code></pre>
  
  <p>All I get for cmboBoxValue is null.</p>
  
  <p>I am so frusterated because I know this must be simple. I am sure I have done this 100* in the past.</p>
  
  <p>I looked here</p>
  
  <p><a href="https://stackoverflow.com/questions/1273998/how-to-submit-http-form-using-c-sharp">How to submit http form using C#</a></p>
  
  <p>but that did not help. It has to be submitted with the asp:Button.</p>
  
  <p>Hopefully this is enough information for you to provide a response.</p>
  
  <p>Thank you for your time.</p>