If you are implementing a Win Forms application, handle the
TextBox KeyUp Event.
If this is a WPF or Silverlight application, handle the WPF/Silverlight
TextBox KeyUp Event
If this is an ASP.NET application, you could set the TextBox's AutoPostback property to True and implement a method that handles the
TextBox TextChanged Event. But I would be more inclined to find a JavaScript solution instead.
Anyways...
In the method that handles that event, check if the enter key was hit. If it was hit, then add your entry; otherwise do nothing.
-Frinny