I am designing a search engine and I want to design it in a way that when user comes to the website the cursor should be already on the search bar. Right now the user needs to hit a tab or manually initiate cursor into the search bar. Any ideas how I can do that?

in a page load event, write YourTextbox.Focus() in !isNotPostback code block.

[This is for Asp.Net C#, please see other syntax for VB.Net]

Thanks! It worked..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.