How do I change the image on a <asp:buttonField type="Image" /> in code behind?
<p>I have a <code>&lt;asp:GridView &gt;</code> with a <code>&lt;asp:ButtonField ButtonType="Image"&gt;</code> as one of the columns.</p>

<p>Here's the problem: I have to dynamically change the image of this ButtonField during the <code>gridView_RowDataBound(...)</code> event based on the data found in that particular gridview row. </p>

<p>The real question is, is how to access that particular ButtonField inside the <code>gridView_RowDataBound(...)</code> event so I can change its image in C# code?</p>

<p>I can't use </p>

<pre><code>Image imgCtrl = (Image)args.Row.FindControl("ctrlID");
</code></pre>

<p>because the <code>&lt;asp:ButtonField&gt;</code> won't allow an ID to be set (get a parser error when I try to run the webPage). And I can't use</p>

<pre><code>args.Row.Cells[0].Controls[0];
</code></pre>

<p>because the zeroth index of the .Controls[0] doesn't exist (I get a boundry overflow error).</p>

<p>There's got to be a simple, slick, easy way to do this!</p>
