/// <summary> /// insert the campaign into the db /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSaveCampaign_Click(object sender, EventArgs e) { Campaign campaign = new Campaign(); campaign.Name = txtCampaignName.Text; campaign.Description = txtCampaignDescription.Text; campaign.ShareCount = 0;//temporary campaign.Voucher = txtVoucher.Text; campaign.Expiration = Convert.ToInt32(ddlExpirationTime.SelectedValue); campaign.LinkUrl = txtCampaignLink.Text; campaign.ImageUrl = InsertPictureToDirectory(); campaign.DateCreated = DateTime.Now; campaign.IsActive = true; campaign.insertNewCampaign(campaign,email); Response.Redirect("Campaign.aspx"); }