Set Cursor on first control in asp.net

To set the cursor at default TEXTBox / Dropdown in Asp.net

Body onload=OnLoad()

For HTML Controls

function OnLoad() {
window.document.frmLogin.txtUser.focus();
}

For Server Side ASP.Net Controls

function OnLoad() {
document.all(‘ddlSelect’).focus();
}

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: