protected void Button4_Click(object sender, EventArgs e) { RequestLeaveRequest request = new RequestLeaveRequest(); request.Username = Session["Username"].ToString(); request.StartDate = CalendarStartDate.SelectedDate.ToString(); request.EndDate = CalendarEndDate.SelectedDate.ToString(); request.LeaveType = DropDownLeaveTypes.SelectedItem.ToString(); request.Reason = txtReason.Text; DAT.LeaveRequest(request); Response.Write("<script language='javascript'>alert('Successfully Added Request!.')</script>"); }