protected void lbSave_Click(object sender, EventArgs e)
        {
            if (IsUserLoggedIn)
            {
                MembershipManager mmgr = new MembershipManager();
                try
                {
                    bool success = mmgr.LogMemberActivity(CurrentMember.MemberId,
                        context.ID.ToGuid(),
                        Constants.UserActivity_Values.Favorited,
                        Constants.UserActivity_Types.ContentRelated);

                    if(success)
                    {
                        lbSave.CssClass = "icon icon-save active";
                        lbSave.Click += lbUnsave_Click;
                        lbSave.Click -= lbSave_Click;
                    }
                }
                catch
                {
                    
                }
            }
            else
            {
                this.ProfileRedirect(UnderstoodDotOrg.Common.Constants.UserPermission.RegisteredUser);
            }
        }
        protected void lbSave_Click(object sender, EventArgs e)
        {
            if (IsUserLoggedIn)
            {
                MembershipManager mmgr = new MembershipManager();
                try
                {
                    bool success = mmgr.LogMemberActivity(CurrentMember.MemberId,
                        context.ID.ToGuid(),
                        Constants.UserActivity_Values.Favorited,
                        Constants.UserActivity_Types.ContentRelated);

                    if (success)
                    {
                        lbSave.Attributes.Add("class", "icon-plus active");
                        lbSave.ServerClick += lbUnsave_Click;
                        lbSave.ServerClick -= lbSave_Click;
                    }
                }
                catch
                {

                }
            }
            else
            {
                string url = SignUpPageItem.GetSignUpPage().GetUrl();
                Response.Redirect(url);
            }
        }
        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;
            }
        }
        protected void btnActivityInsert_Click(object sender, EventArgs e)
        {
            // *** to log a user making a reminder request:
            //   txtActivityValue.Text  = UnderstoodDotOrg.Common.Constants.UserActivity_Values.SetReminder  ;
            //   txtActivityType.Text = UnderstoodDotOrg.Common.Constants.UserActivity_Types.ContentRelated.ToString();

            // *** to log a user browsing to a convio luminate hosted page:
            // string targetUrl = "http://www.somethinghostedonconvio.com/myarticle.php";
            // txtActivityValue.Text = targetUrl;
            // txtActivityType.Text = UnderstoodDotOrg.Common.Constants.UserActivity_Types.Advocacy_Page.ToString();

            MembershipManager mmgr = new MembershipManager();
            try
            {
                bool success = mmgr.LogMemberActivity(Guid.Parse(txtMemberGuid.Text),
                                                      Guid.Parse(txtContentId.Text),
                                                      txtActivityValue.Text,
                                                      int.Parse(txtActivityType.Text));
                lblSuccess.Text = success.ToString();
            }
            catch (Exception ex)
            {
                lblSuccess.Text = "Exception! " + ex.Message ;
            }
        }