Cursor Position at the end of textbox control

Posted by Anishsethu under ASP.NET on 5/21/2012 | Points: 10 | Views : 3596 | Status : [Member] | Replies : 1
I want to search records on the basis of entering text into the textbox field,its work fine ,but the cursor is pointed in first text in the control,,,

Cursor is not pointed at the end of the text in text box

Please Provide solution for this


Posted by: Santhiram on: 5/21/2012 [Member] Starter | Points: 25

To position the cursor at the end of the contents of a TextBox control, call the Select method of the textbox and specify the selection start position equal to the length of the text content, and a selection length of 0.

txtBox1.Select(txtBox1.Text.Length, 0);

Anishsethu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response