Quote:
|
on the page load I fill the text box from the text in the file:
|
But if you don't add a check for Page.IsPostback, the Text property is updated again after the user clicked the button, and before the button's Click event fires. This resets the user data, causing the behavior you're describing.
BTW, rather than using StreamWriters and so on, you can also use System.IO.File.WriteAllText(....)
Cheers,
Imar