Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
Hello........

I am beginner in c# programming, want to know when we feed a text box then which event occurs and how does it work. Kindly explain it in detail.......

Soon reply will be appreciated.....!!!!

Thanks...
Posted 23-Jan-13 19:10pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Like most other .NET controls, Textbox has a large number of possible events, many of which will not be relevant to your question. The problem is that it is difficult to answer precisely because we do not know what you are trying to do, and this don't know which events to concentrate on.
 
However, the ones you are probably most interested in are:
Enter         Fires when the user input focus goes to the text box
KeyDown       Fires when the user presses a key down
KeyPress      Fires when the user has pressed a key
KeyUp         Fires when the user releases a key
Leave         Fires when the text box loses focus (i.e. when the input goes to another control)
TextChanged   Files when the Text property of a texbox changes
Validated     Files when teh text box content has been validated as ok
Validating    Files when the text box content needs to be checked.
 
And if you tab into a text box, type a "1" and tab out, they occur in this order:
Enter
KeyDown
KeyPress
TextChanged
KeyUp
Leave
Validating
Validated
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

TextChanged event Occurs.
 
If you want to know more about events please go through the below links
http://msdn.microsoft.com/en-us/library/aa645739(v=vs.71).aspx[^]
Events and event handling in C#[^]
 
If you want to create custom events below links helps you
Creating advanced C# custom events[^]
http://stackoverflow.com/questions/6644247/simple-custom-event-c-sharp[^]
 
hope this helps
  Permalink  

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



Advertise | Privacy | Mobile
Web03 | 2.8.150302.1 | Last Updated 24 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100