You can use the focus() method in JavaScript.
Here is a sample code.
<script type="text/javascript">
function setFocus()
{
var checkbox = document.getElementById('<%=checkBox1.ClientID %>');
var Textbox = document.getElementById('<%= txtTest.ClientID%>');
if(checkbox.checked)
{
Textbox.disabled =false;
Textbox.focus();
}
else
{
Textbox.disabled =true;
}
}
</script>
<asp:CheckBox ID="checkBox1" runat="server" OnCheckedChanged="checkBox1_CheckedChanged" />
<asp:TextBox ID="txtTest" runat="server" Enabled="false"></asp:TextBox>
In your code behind file include this line under Page_Load()
checkBox1.Attributes.Add("onClick", "setFocus()");