i have passes some values though a constructor from one from to another. the values are successfully transferred in another form through constructor but when i display them in a textbox the values become null and the textbox remains empty. i am showing the code of the constructor for both forms.
starting form which opens another form
private void lbl_imgpass_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
string img = img_name.Text;
Setimgpass st = new Setimgpass(img);
st.Show();
}
form1(from where the values are transferred to another form)
else
{
first = textBox2.Text;
second = textBox3.Text;
third = textBox4.Text;
Adduser add = new Adduser(x1low, x1up, x2low, x2up, x3low, x3up, y1low, y1up, y2low, y2up, y3low, y3up, first, second, third);
this.Hide();
}
second form(where the values are received)
public Adduser(string x1low, string x1up, string x2low, string x2up, string x3low, string x3up, string y1low, string y1up, string y2low, string y2up, string y3low, string y3up,string first, string second, string third)
{
InitializeComponent();
frst = first;
secnd = second;
thrd = third;
lowx1 = x1low;
upx1 = x1up;
lowx2 = x2low;
upx2 = x2up;
lowx3 = x3low;
upx3 = x3up;
lowy1 = y1low;
upy1 = y1up;
lowy2 = y2low;
upy2 = y2up;
lowy3 = y3low;
upy3 = y3up;
txt_imgpass.Text = frst + " " + secnd + " " + thrd;
}
txt_imgpass is the textbox in which i want values.