protected void btnEM24_Click(object sender, EventArgs e) { BaseReply reply = ExactTargetService.InvokeEM24ContentSharedWithAFriend(new InvokeEM24ContentSharedWithAFriendRequest { PreferredLanguage = new Guid(ddlLanguages.SelectedValue), ContentHelpfulnessAndCommentsModule = "<p>15 people thought this was helpful.</p><p>10 comments</p>", PMText = "this is a private message!", ReminderImage = "www.photobucket.com", ReminderLink = "www.google.com", ReminderSummary = "This is a summary of the reminder", ReminderTitle = "reminder title", ToEmail = tbxSubscriberEmail1.Text, UserContactFirstName = tbxSubscriberFN1.Text }); lblMessage.Text = reply.Message; }
protected void btnSend_Click(object sender, EventArgs e) { Page.Validate("vlgEmailForm"); if (Page.IsValid) { Item currentItem = Sitecore.Context.Item; InvokeEM24ContentSharedWithAFriendRequest message = new InvokeEM24ContentSharedWithAFriendRequest { RequestUrl = Request.Url }; message.PMText = txtThoughts.Text.Trim(); message.ToEmail = txtRecipientEmail.Text.Trim(); message.UserContactFirstName = txtYourName.Text.Trim(); message.RequestUrl = Request.Url; string domain = new Uri(HttpContext.Current.Request.Url.AbsoluteUri).GetLeftPart(UriPartial.Authority); if (currentItem != null) { message.ReminderLink = domain + currentItem.GetUrl(); } BaseReply reply = ExactTargetService.InvokeEM24ContentSharedWithAFriend(message); MembershipManager mmgr = new MembershipManager(); if (IsUserLoggedIn) { try { bool success = mmgr.LogMemberActivity(CurrentMember.MemberId, currentItem.ID.ToGuid(), Constants.UserActivity_Values.Shared, Constants.UserActivity_Types.ContentRelated); } catch { } } pnlConfirmation.Visible = true; pnlForm.Visible = false; } else { validWarning.Visible = true; } }