Fluent.ControlFocus
This is a very simple non-visual web control which will automatically set focus to a given WebControl after the page has completed loading. This may be useful in situations such as page validation, for example, if you want the cursor to be positioned in a given field which needs correction after a validation failure on postback. The control has one simple attribute, and is used as follows:
Code Example
<%@ Register TagPrefix="fluent" Namespace="Fluent.ControlFocus" Assembly="Fluent.ControlFocus" %>
...
<asp:TextBox runat="server" ID="FirstTextBox" /><br/>
<%-- the control below, SecondTextBox, will be focused on page load --%>
<asp:TextBox runat="server" ID="SecondTextBox" />
<fluent:ControlFocus runat="server" Control="SecondTextBox" />
Copyright © 2002-2003 Fluent Consulting. All rights reserved.