0

hi, i have problems here. i have two textbox: textbox1 and textbox2 : Order and Buyer. i want to make if user type order in textbox1 and they click enter or using mouse click, the buyer based on order will appear in textbox2. how to achieve this in asp.net webpage using c# ? because it does not have keypress or something that i want to write code. i dont want to use any button because i have any other requirements must enter before click button submit. just those two textbox ? someone help ?

Edited by happygeek: moved

3
Contributors
4
Replies
24
Views
5 Months
Discussion Span
Last Post by Web-Designer
0

i have use this code but it does not works :( did i miss anything here ?

protected void TextBoxJO_TextChanged(object sender, EventArgs e)
{
    DataTable dt=new DataTable();

    query = "select cusfname from mescomm..CustomerLib a, mestrans..JobOrder_HD b where a.cuscode = b.customer_cd and po_no ='" + TextBoxJO.Text + "'";
    cmd = new SqlCommand(query);
    SqlDataReader reader = cmd.ExecuteReader();
    if (reader.Read())
    {
        TextBoxBuyer.Text = reader["cusfname"].ToString();

        reader.Close();
        con.Close();
    }

}

Edited by tenten..

1

i just add autopostback=true in html and it works with above code ! thankyou :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.