when user enter any details in textbox and when record match in database then the popup page should be open when user press tab button and loss fucus.
how to do this?
exa.
Firstname - Textbox1
Middlename - Textbox2
Lastname - Textbox3
And in Table name saved in single column Like below.
Firstname Middlename Lastname
if the name is match which is typed in three textboxes when textbox lostfocus then popup page should be open with related name details.
i have tried like as below.
string namestring = txtfname.Text + " " + txtmname.Text + " " + txtlname.Text;
SqlConnection con = new SqlConnection(this.con);
con.Open();
//SqlCommand cmd = new SqlCommand("Select Name='"+ txtfname.Text+ " " + txtmname.Text + " " +txtlname.Text + "' From RESTICTIED_STUDENTS", con);
SqlCommand cmd = new SqlCommand("Select * From RESTICTIED_STUDENTS where Name Like '" + namestring + "'", con);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
int i = ds.Tables[0].Rows.Count;
if (i > 0)
{
Response.Redirect("restrictedstudents.aspx");
string url = "restrictedstudents.aspx";
string page = "window.open('" + url + "')";
string s = "window.open('" + url + "', 'popup_window', 'width=450,height=500,left=450,top=50,resizable=no');";
ClientScript.RegisterStartupScript(this.GetType(), "script", page, true);
}