How to get a field value in a DetailView
<p>i am trying to get access to a field in a detailview and display it in a label.  Note, i have converted the field into a templdate field.  I am not getting anything in the Output label.  what am i doing wrong here? thanks</p>

<pre><code>if (this.DetailsView1.DefaultMode == DetailsViewMode.Edit) 
        { 

            { 
                TextBox dv = this.DetailsView1.FindControl("ID") as TextBox; 
                // dv.Text = "RCA Assigned"; 
                Session["MySessionVar"] = dv; 
                OutputLabel.Text = (string)Session["MySessionVar"]; 
            } 
        } 

        else 
        { 
            TextBox dv = this.DetailsView1.FindControl("ID") as TextBox; 
            OutputLabel.Text = (string)Session["MySessionVar"]; 
        }
</code></pre>
