converting selected value from dropdownlist into int
<p>I have a drop down list and I want the selected value to put into an int variable, then in my aspx page I want to assign it to a rowspan. This is my C# code for getting the value and converting it:</p>

<pre><code>protected void drop_SelectedIndexChanged(object sender, EventArgs e)
        {
            int a = Int32.Parse(drop.SelectedValue.ToString());
</code></pre>

<p>And this is my aspx code where I'm trying to assign the variable a :</p>

<pre><code> &lt;asp:TableHeaderRow&gt;
 &lt;asp:TableHeaderCell RowSpan="&lt;% a %&gt;"&gt;Hostese&lt;/asp:TableHeaderCell&gt;
 &lt;/asp:TableHeaderRow&gt;  
</code></pre>

<p>I get the error: cannot create an object of type int32 from its string representation. Can anyone say why? It's an asp.net application with C#.</p>
