I need a code example for this question. I have a ListView control and a text box on my form, set up like you would see in most e-mail clients with the list of messages up top and a preview pane below, and when you click on a row in the listview it shows the message in the preview pane.

If my user edits the text in the text box, I want to prompt them to save before they move to another "message". How would I write the validation code for this?