protected void btnInsert_Click(object sender, EventArgs e) { DBOps db = new DBOps(); string _key = txtInsertLab.Text.Trim(); string bldg = txtInsertBuilding.Text.Trim(); string _value = txtInsertRoom.Text.Trim(); if ((_key != String.Empty && _key != "") || (bldg != String.Empty && bldg != "") || (_value != String.Empty && _value != "")) { int retval = db.InsertLabsTable(_key, bldg, _value); if (retval > 0) { txtInsertLab.Text = ""; txtInsertBuilding.Text = ""; txtInsertRoom.Text = ""; lblInsertInfo.ForeColor = System.Drawing.Color.LightSeaGreen; lblInsertInfo.Text = retval.ToString() + " row inserted"; lblInsertInfo.DataBind(); } } else { lblErr.Text = "Please Enter all necessary fields before clicking on \"Insert\" "; lblErr.DataBind(); } RefreshTable(); }