protected void Button1_Click(object sender, EventArgs e) { SqlConClass so = new SqlConClass(); int rating = 10; if (!TextBox1.Text.Equals("")) { rating = Int32.Parse(TextBox1.Text); } so.RateDriver(mergedTripId, rating, TextBox3.Text);//This rating held on Passenger Table }