C# winform how textbox became null on button click second time?
问题 In a form I have group Box which contains tab control with 4 tabs. In the second tab I have some textboxes and before saving data I need to validate input entered in these textbxes. Please note my save button is in last tab. The following test scenario works: Invalid input in first textbox Invalid input in second textbox Click button However, in the following test scenario an "Object refrence not set to an instance of a object" exception is thrown: Invalid input in first textbox Click button