protected void ButtonTask_Click(object sender, EventArgs e) { RequestAddTask request = new RequestAddTask(); DataTable dt = new DataTable(); request.UserID = DropDownListEmployee.Text; request.Task = txtTasks.Text; request.TaskDate = CalendarTaskDate.SelectedDate.ToString(); try { DAT.AddTask(request); Response.Write("<script language='javascript'>alert('Added Task Successfully!.')</script>"); } catch { Response.Write("<script language='javascript'>alert('Added Task Failed!.')</script>"); } }