What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 23759 |  Welcome, Guest!   Register  Login
 Home > Forums > ASP.NET > Cursor Position at the end of textbox control ...
Anishsethu

Cursor Position at the end of textbox control

Replies: 1 | Posted by: Anishsethu on 5/21/2012 | Category: ASP.NET Forums | Views: 1126 | Status: [Member] | Points: 10  


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


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Santhiram
Santhiram  
Posted on: 5/21/2012 12:00:02 PM
Level: Starter | Status: [Member] | 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.

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

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

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/23/2013 3:11:42 PM