title: How to convert a DropDownList Value in INT Variable
body: <p>neI have a DropDownList with a list of value.</p>
  
  <p>I need in my code USE the value selected by the User in the DropDownList AS INT DataType (numeric).</p>
  
  <p>At the moment I am using this code below (CONVERTING DATATYOES). 
  Script work just fine.</p>
  
  <p>But <strong>I would like to know if exists an alternative way to do it</strong>.</p>
  
  <p>Any ideas it is very appreciate. Thanks for your time.</p>
  
  <hr>
  
  <pre><code>   &lt;asp:DropDownList ID="uxPageSizeUsersSelector" runat="server" 
      AutoPostBack="True" 
      onselectedindexchanged="uxPageSizeUsersSelector_SelectedIndexChanged"&gt;
      &lt;asp:ListItem Value="1" Selected="True"&gt;1&lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="2"&gt;2&lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="3"&gt;3&lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="4"&gt;4&lt;/asp:ListItem&gt;
  &lt;/asp:DropDownList&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>        int myPageSize = Convert.ToInt16(uxPageSizeUsersSelector.SelectedValue.ToString());
          PageSize = myPageSize;
  </code></pre>