protected void btnInsertSession_Click(object sender, EventArgs e) { try { if (txtRFIDSes.Text == "") { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "err_msg", "MessageBox('Error','Please Enter RFID Number');", true); } else { Membership objMember = PaymentController.GetMembersByRfidNo(txtRFIDSes.Text); if (objMember != null && objMember.ID == MemberId) { InsertTransaction(); BindTransaction(); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "err_msg", "MessageBox('Error','Invalid RFID Number');", true); txtRFIDSes.Text = ""; } } } catch (Exception ex) { throw ex; } }