Bhavesh Vankar

Bhavesh Vankar

  • 762
  • 1.1k
  • 87.2k

Popup open but data not showing

Jun 26 2021 9:34 AM
SqlConnection con = new SqlConnection(this.con);
            SqlCommand selectcmd = new SqlCommand("SELECT NAME, ADDRESS FROM RESTICTIED_PERSON WHERE NAME ='" + TextBox1.Text + "'",con);
            SqlDataAdapter sda = new SqlDataAdapter(selectcmd);
            DataTable dt = new DataTable();
            sda.Fill(dt);
            if (dt.Rows.Count > 0)
            {
ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "showModal();", true);
                lbluname.Text = dt.Rows[0]["NAME"].ToString();
                lbluaddress.Text = dt.Rows[0]["ADDRESS"].ToString();

            }

i have used below code to open modal popup using bootstrap 4.5 issue is modal is open when i type text and lost focus from textbox but record not showing in lable kindly support me to solve this what to do and what issue can be in program...?

 


Answers (6)