Click here to Skip to main content
15,921,694 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am new to Windows Application...i created textbox if i click that textbox it will show the Data in the Database..for example i create the Lable Username and the Textbox if i click the textbox that will be show the user name in views...i already save that Username in the Database...or Give an Simple Example sites for the Windows Application Using C#..
Posted
Updated 4-Nov-11 19:28pm
v3
Comments
Sam Path 5-Nov-11 1:38am    
How can i create the on click event for the text box?

1 solution

For showing user name in your text box's on click event, you need to add onClick event to your text box and right the code to fetch your user name from your database and as the result of your select query you can directly assign that to your text box by writing like this...

C#
TextBox1.Text = ..../// your resulted user name
 
Share this answer
 
Comments
Sam Path 5-Nov-11 1:34am    
Thanks for your Reply sir...
RaviRanjanKr 5-Nov-11 11:02am    
Nice Answer, My 5+

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