Michael Ommer

Michael Ommer

  • NA
  • 8
  • 12.8k

Empty string from passing data value between windows forms

Jun 7 2011 8:27 AM
I am working on a C# project in which I have a couple of textboxs in my first form and through a second form user inputs the text data and it is produced in my first form (the already opened one). I am taking this data and search it to the database behind.


I used the following article to pass values from the second form to the first one ( http://www.c-sharpcorner.com/uploadfile/mosessaur/winformsdelegates09042006094826am/winformsdelegates.aspx ).

The problem is that as soon as I take the text data from my first form  the string variable is absolutly empty.

I tranformed the code of the article's project  in order to see what I am saying. (As soon as the user clicks on the second scenario and writes the data, he closes the second form and press the enter button the messagebox alert is empty...)


any idea what is wrong?

Cheers

Answers (5)