How to place cursor at the end and begining of the text in textbox??????


Welll these days , i am working on a small project and i am actually using textbox.focus() method to make focus on textbox, it is all going well, but the problem is -- it is selecting whole text also, then what i do , i use textbox.deselectall() method to deselect the text, but now again a new problem arises ,it is placing the cursor at the beginning of textbox, and i want to place the cursor at the end of the text, so i come with a very small and interesting code to place cursor at the end of the text in the textbox.... Here is the Code:---


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


Similary,if you want to place cursor at the beginning of the text in textbox, then use this code :---


textBox1.Select(0,0);



Total Pageviews