Tech Tutorials Database
GeekArticles Database SQL Server
 

Focusing and Selecting the Text in ASP.NET TextBox Controls

 
Author: 4guysfromrolla.com
Category: SQL Server
Comments (0)

<p> When a browser displays the HTML sent from a web server it parses the received markup into a Document Object Model, or DOM, which models the markup as a hierarchical structure. Each element in the markup - the <code>&lt;form&gt;</code> element, <code>&lt;div&gt;</code> elements, <code>&lt;p&gt;</code> elements, <code>&lt;input&gt;</code> elements, and so on - are represented as a node in the DOM and can be programmatically accessed from client-side script. more, the nodes that make up the DOM have functions that can be called to perform certain behaviors; what functions are available depend on what type of element the node represents. </p><p> One function common to most all node types is <code>focus</code>, which gives keyboard focus to the corresponding element. The <code>focus</code> function is commonly used in data entry forms, search pages, and login screens to put the keyboard cursor in a particular textbox when the web page loads so that the user can start typing in his search query or username without having to first click the textbox with his mouse. Another useful function is <code>select</code>, which is available for <code>&lt;input&gt;</code> and <code>&lt;textarea&gt;</code> elements and selects the contents of the textbox. </p><p> This article shows how to call an HTML <code>focus</code> and <code>select</code> functions. look at calling these functions directly from client-side script as well as how to call these functions from server-side code. Read on to learn more! <br /><a More &gt;</a></p>

Read More...




Sponsored Links




Read Next: Creating PDF Documents with ASP.NET and iTextSharp



 

 

Comments



Post Your Comment:

Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe