Problems changing properties on a control using the controls name
<p>This should work.. I think..</p>

<pre><code>string ctrlName = "btnSomeButton" + someIndexValue;
this.Controls[ctrlName].Text = "Some value";
</code></pre>

<p>I get 'Object reference not set to an instance of an object.', the control does exist on the form. I've tried casting it.</p>

<p>Solution:</p>

<pre><code>string ctrlName = "btnSomeButton" + someIndexValue;
Control[] ctrl = this.Controls.Find(ctrlName, True);
Button btn = (Button)ctrl[0];
btn.Text = "Some Value";
</code></pre>

<p>Thank you.</p>
