Answer: You can do it either using JS, for attribute or control method.
With JS, you will have to use focus method.
function focustest()
{
document.getElementById("TextBox5").focus();
}
With form, you can add attribute called “defaultfocus” to the desired control.
defaultfocus="TextBox5
" sets focus to textbox5.
And programatically, you can set it by :
TextBox5.Focus()
Asked In: Many Interviews |
Alert Moderator