protected void saveButton_Click(object sender, EventArgs e) { Project projectObj = null; ProjectGateway ProjectGatewayObject = null; try { projectObj = new Project(); projectObj.ID = idLabel.Text; projectObj.Title = nameLabel.Text; projectObj.Description = descriptionLabel.Text; projectObj.StartDate = Convert.ToDateTime(startDateLabel.Text); projectObj.EstimateTime = Convert.ToDateTime(estimateTimeLabel.Text); projectObj.ClientId = clientIdLabel.Text; projectObj.Employee_Id = employeeIDs; projectObj.Status = statusLabel.Text; ProjectGatewayObject = new ProjectGateway(); string message = ProjectGatewayObject.InsertProject(projectObj).ToString(); Response.Redirect("ProjectCreateUIPage.aspx?" + "&message =" + Server.UrlEncode(message)); } catch (PrimaryKeyException primaryKeyExceptionObj) { errorMessageLabel.Text = primaryKeyExceptionObj.Message; } catch (SqlException sqlExceptionObj) { errorMessageLabel.Text = sqlExceptionObj.Message; } catch (Exception exceptionObj) { errorMessageLabel.Text = exceptionObj.Message; } }