on-internet
← Community

Why does changing a value twice work for modifying a bound textbox?

Stack Overflow ·

Also see Why does a Bound Textbox not modify its associated property is the Text value is set programmatically? This question applies to .net in general. The examples here are vb syntax. Suppose we have a Form with a TextBox control holding a date, tagged txtProjectDate. A picker is added to the form, so a date can be selected via mouse controls. Assume the code below lives inside our form class definition file. Private Sub dtpProjectDate_Closeup(ByVal sender as Object, ByVal e as System.EventArgs) Handles dtpProject.CloseUp Dim strNewDate As String = Format(dtpProjectDate.Value, "Short Date")

Comments

Sign in or sign up to comment and upvote.

No comments yet.