Set focus to end of text in textbox after postback?
<p>I've got a simple ASP.Net form with txtBox and btn.<br>
User click btn, which adds text to an ASP:TextBox in a postback (its adding a known "starter text".<br>
After the postback I'd like the focus to be set to the end of the text in the textbox.</p>

<p>If I call Page.SetFocus(...) or txtBox.Focus() then the txtBox gets focus, but at the beginning of the text - which means if the user starts typing, they'll be in the wrong place.</p>

<p>e.g.<br>
<code>cursor</code>100-01  </p>

<p>would like it to be  </p>

<p>100-01<code>cursor</code></p>

<p>I've tried the following in the textbox:  </p>

<pre><code>onfocus="alert('focus');this.value = this.value;"
</code></pre>

<p>but the "alert" only appears the first two times? Then nothing?</p>
