Set Focus on Page Load / After Postback / After Submit in ASP.NET 2.0 and ASP.NET 3.5 - Setting Focus to an ASP.NET ControlIn ASP.NET 1.x, it is not possible to programmatically set focus to a web server control without using the JavaScript's focus() function. You may find the details on how to set focus to web controls in ASP.NET 1.x in one of my previous articles: Set Focus After PostBack in ASP.NET 1.x - Setting Focu...
Setting Focus Using Javascript to an Input Field / Form Field / Html Element (Textbox) when the Page LoadsThe javascript code below shows how to set the focus on an element/input field (textbox) when the page is loaded.
Using JavaScript with ASP.NETASP.NET provides a powerful server-based programming model with its postback architecture that allows performing all the work on the server while ensuring security and compatibility. The most significant weakness of postback architecture is its overhead. It is impossible to react to mouse movements ...