Search This Blog

Thursday, November 3, 2011

TabContainer Setting Focus to a control inside the TabPanel

 Place this at the BOTTOM of your ASP.Net Page.  Replace txtPartNo with the name of your control.



<script language="javascript" type="text/javascript">
   
Sys.Application.add_load
   
(
       
function()
       
{
            window
.setTimeout(focus, 1);
       
}
   
)
   
function focus()
   
{
        document
.getElementById('<%=txtPartNo.ClientID %>').focus();
   
}
</script>