Click here to Skip to main content
15,881,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
On selecting the Enter key the system should do the following and switch focus to
C#
txt_Interest.Text;

However it doesn't. How do I correct this?

Thanks

C#
protected void txt_Principal_TextChanged ( object    sender, 
                                           EventArgs e)
     {
     decimal Kprincipal = Convert.ToDecimal ( txt_Principal.Text );

     txt_Principal.Text = Kprincipal.ToString( "N" );
     txt_Interest.Focus ( );
     }
Posted
Updated 1-Aug-14 4:53am
v7
Comments
gggustafson 1-Aug-14 10:54am    
Is this in a WinForm or WebForm?

1 solution

Try

C#
txt_Interest.Select();


Hope this helps,
CodeFate.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900