Click here to Skip to main content
15,890,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Experts ,

I have 3 textboxes on my webpage and a login button.

Textbox1-TxtUserName
Textbox2-TxtDisplayName
Textbox3-TxtPassword

When I Enter Username in 1st textbox and press TAB Button the cursor must go to the 3rd Textbox when tab pressed.

In this DisplayName will be automatically Displayed after entering Username.

==========================================================

So My REQUIREMENT IS AFTER ENTERING USERNAME, The CURSOR MUST GO THE 3rd Textbox(TxtPassword)

Please help me , how to do this.

Thanks.
Posted

Set the TabOrder: MSDN "Tab order"[^]
 
Share this answer
 
Set Tabindex property of textboxes.

C#
TextBox1.TabIndex = 1;
TextBox2.TabIndex = 2;
TextBox3.TabIndex = 3;




Thanks
AShish
 
Share this answer
 
textBox3.TapOrder=1;
 
Share this answer
 
Comments
Ranjith Reddy CSE 23-Jun-12 5:39am    
we dont have TapOrder Property in asp.net

Please suggest me, how to do this ??
use tabindex property for this
and for fill name in second textbox use js function

like this

C#
Textbox1.TabIndex=0;
Textbox3.TabIndex=1;
Textbox1.Attributes.Add("onnblur", "" + Textbox2.ClientID + ".value=" + Textbox1.ClientID + ".value");
 
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