protected void saveButton_Click(object sender, EventArgs e) { LoanParty loanParty = new LoanParty(); loanParty.LoanCode = int.Parse(loanCodeTextBox.Text); loanParty.LoanName = loanNameTextBox.Text; loanParty.Remarks = remarksTextArea.InnerText; if (loanCodeTextBox.Text == "" || loanNameTextBox.Text == "" || remarksTextArea.InnerText == "") { message.InnerText = "All Fields are Required!!"; } else { message.InnerText = loanManager.Save(loanParty); } }