I have two forms, namely MainDataForm and JobForm.
In MainDataForm I have a text box named txtJobID which contains a certain job ID. There I also have a button - btnNewJob, if clicked opens the above said JobForm.
Now, on JobForm there is another text box named txtNewJobID and when the JobForm loads, I need this txtNewJobID to display the same data that was on the txtJobID of MainDataForm.
At the moment, I created a get method on MainDataFrom which looks like this:
public string GetJobID
{
get
{
return this.txtJobID.Text;
}
}
Now I'm aware that if I call this method from withing the JobForm I'll be able to access the data which was on the MainDataForm. (Or am I wrong?)
The problem is, when I'm in the load event of the JobForm, how do I access the instance of the MainDataFrom which contains the text box txtJobID with data in it?
Please help ASAP.
Thanks in advance!