'Textbox updated value not display in windows application form

Form1

         private void btn_search_Click(object sender, EventArgs e)
        {
            frm_invoice.search_invoice(drp_search.SelectedValue.ToString(),this);
        }

Form2

        public void search_invoice(string invoice_no, Form form)
        {
            DataTable dt_invoice = jar.GetDataTable("select  invoice_no from invoice where invoice_no='" + invoice_no + "'");
            form.Close();
            txt_search_invoice.Text = dt_invoice.Rows[0]["invoice_no"].ToString();          
        }       

But Value not display textbox when debug project i see the value of textbox but no display on form textbox.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source