how to put focus back on textbox which fails validation ,inside gridview
<p>I have below <code>textbox</code> inside <code>itemtemplate of gridview.</code>.problem is when i click on <code>edit button of gridview</code>,and if i enter invalid value in <code>textbox</code> according to validation logic, <code>focus of textbox is lost</code> when i click on <code>update button</code>..if i am at 30est row focus went to top most row..how to prevent focus..</p>

<pre><code>&lt;asp:TextBox ID="tbattendence"  Width="40px" runat="Server" Text='&lt;%# Eval("attendence") %&gt;' onkeydown = "return (event.keyCode!=13);"&gt;
                            &lt;/asp:TextBox&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                              &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbattendence"
                ErrorMessage="Attended Attendence is required!"  Display="Dynamic"  ValidationGroup="bottom" 
               ForeColor="#6600FF"&gt;*&lt;/asp:RequiredFieldValidator&gt;

              &lt;asp:CompareValidator ID="CompareValidator" runat="server"  ErrorMessage="Attended Attendence must be Lesser!"
                                ControlToValidate="tbattendence" ControlToCompare="tbcutoff"  
                                Display="Dynamic" Operator="LessThanEqual" Type="Integer" ValidationGroup="bottom"&gt;*&lt;/asp:CompareValidator&gt;  
</code></pre>
