ASP.Net By Meetu

To Share What I have learnt till now in my professional journey

Move Cursor to the Last Index in The Texbox

Posted by Meetu Choudhary on June 18, 2009

Code for script section in the head

<script type=“text/javascript” language=“javascript”>
function moveindex() {
var me2 = document.selection.createRange();
me2.moveStart(“character”, 200);
me2.select();
}
</script>

code for calling the function in the body section

<asp:TextBox ID="TextBox1" runat="server" onfocus="moveindex()"/>


Thanks and Regards
Meetu Choudhary

Leave a Reply

You must be logged in to post a comment.