public partial class Pay : System.Web.UI.Page { int a = 600; int b = 500; int c = 800; string ph; protected void Button2_Click2(object sender, EventArgs e) { ph = DropDownList2.SelectedItem.Text; if (ph == "physics") { TextBox9.Text = a.ToString(); } else if (ph == "chemistry") { TextBox9.Text = b.ToString(); } else if (ph == "maths") { TextBox9.Text = c.ToString(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)