Click here to Skip to main content
15,889,723 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Dear all

I am creating a project in C#, and Sql server 2005. i have a table in sql and the fields are name, age, ph, add. in the C# i have a form and have 4 text box. now i want to show all the information on thease text box like in first text box i will inter name and press tab then in other text box should show all the fields of that name like add, ph, age and all these information. Pleae help me to create this code in first taext box inter name and then show all the information in other text box like in text box2 show ph, in textbox3 show age......


Pleaes help me how to create this...



thanks in advance.
Posted

 
Share this answer
 
you may use Jquery Autocomplete Search and Fill all text box on select of items.
 
Share this answer
 
Comments
[no name] 7-Nov-11 5:26am    
J query works in win forms?
You may use AJAX for that purpose......

Check out AJAX for ASP.NET in code Project
 
Share this answer
 
v2
Comments
[no name] 7-Nov-11 5:28am    
good one, but Ajax works only in WEB. we are not sure whether he is in WEB or winForms
U can use MouseLeave Event in C# .
Fisrt fetch the data in dataset or datatable then in the mouseLeave event check the cohdition for the contentin textbox ie. for name:
C#
private void textBox1_MouseLeave(object sender, EventArgs e)
        {
            if (textBox1.Text == ds.tables[0].rows[0]["name"])
                textBox2.text...........
        }
 
Share this answer
 
Comments
[no name] 7-Nov-11 5:27am    
mouse leave? what if i use my keyboard?

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