I have a problem in passing a string value between two forms.
First I created public string sanacode which I assign the value passed in form 2
Form 1 code
AnalysisEdit ae = new AnalysisEdit();
int Row = dataGridView1.CurrentRow.Index;
ae.sanacode = dataGridView1[0, Row].Value.ToString();
ae.Show();
Form 2 constructor code
public AnalysisEdit()
{
InitializeComponent();
MessageBox.Show(sanacode,);
}
it shows me nothing
ae.sanacode = dataGridView1[0, Row].Value.ToString();is pulling back any value? Also post more code of yourAnalysisEditform or you are going to end up with everyone posting to make a property or variable. You may have already done this.