Casting object from Drop Down Into Nullable type
<p>I have the following drop down in my aspx:</p>

<pre><code>&lt;aspx:DropDownList
ID="ddl1"
runat="server"/&gt;
</code></pre>

<p>In the code-behind (C#), I want to retrieve the value from the DropDownList.</p>

<p>I populated my dropdown as such:</p>

<pre><code>ddl1.DataSource = LocationOfData;
ddl1.DataBind();
</code></pre>

<p>LocationOfData returns of type CustomType. EDIT: CustomType is an enum.</p>

<p>I want to be able to accomplish the following:</p>

<pre><code>CustomType? myvar = ddl1.Text
</code></pre>

<p>In other words, create a nullable variable using my CustomType and set it equal to the variable from the drop down. But the type that I can only retrieve Text (String) from ddl1.</p>
