How To Get A Value Out Of A DetailsView DataItem Property
<p>I am accessing a DetailsView from the following event</p>

<pre><code> public void dvDetails_DataBound(Object sender, EventArgs e)
</code></pre>

<p>I am casting the sender to my detailsview like so</p>

<pre><code>DetailsView dv = (DetailsView)sender;
</code></pre>

<p>Now when I look in "dv" I can see the DataItem property has the data I want in it under a field name, but I dont know how to write the code access the value??</p>

<p>The field name is shown in the dataitem property as "_DTMON_F", I tried to say </p>

<pre><code>Datetime myDate=dv.DataItem["_DTMON_F"]
</code></pre>

<p>BUT C# doesnt like the syntax, can someone help me with this?</p>
