//function i used for this private void BindView() { SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["sqlCon"].ConnectionString); con.Open(); using (SqlCommand command = con.CreateCommand()) { int productid = Convert.ToInt32(ddproduct.SelectedValue.ToString()); string query = "SELECT productprice FROM Product_Master WHERE is_activate=1 AND productid=" + productid.ToString(); command.CommandText = query; SqlDataReader dr = command.ExecuteReader(); if (dr.Read()) { txtpayment.Text = dr["productprice"].ToString(); } else { } con.Close(); dr.Close(); } } //drop down protected void ddproduct_SelectedIndexChanged(object sender, EventArgs e) { BindView(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)