protected void Page_Load(object sender, EventArgs e)
    {
        Ajax.Utility.RegisterTypeForAjax(typeof(Shared_Story));
        //code for YT MObile redirections
        string redirctMobileUrl = string.Empty;

        MiscellaneousController objMisc = new MiscellaneousController();
        if (!IsPostBack)
        {
            DeviceManager deviceManager = new DeviceManager
            {
                UserAgent = Request.UserAgent,
                IsMobileBrowser = Request.Browser.IsMobileDevice
            };
            // Added by Varun Goel for NoRedirection functionality on 28 Jan 2013
            TributesPortal.Utilities.StateManager stateManager = StateManager.Instance;
            objSessionValue = (SessionValue)stateManager.Get("objSessionvalue", StateManager.State.Session);

            // Validate if Session value for NoRedirection is set
            if (deviceManager.IsMobileDevice() && (objSessionValue == null || objSessionValue.NoRedirection == null || objSessionValue.NoRedirection == false))
            {
                #region MObile Redirect

                Tributes obTrb = new Tributes();
                string mTrbUrl = string.Empty;
                string mTrbType = string.Empty;
                string strStartUrl = string.Empty;
                int mTabId = 0;
                if (Request.QueryString["TributeUrl"] != null)
                {
                    obTrb.TributeUrl = mTrbUrl = Request.QueryString["TributeUrl"].ToString();
                }
                if (Request.QueryString["TributeType"] != null)
                {
                    obTrb.TypeDescription = mTrbType = Request.QueryString["TributeType"].ToString();
                }
                if (!(string.IsNullOrEmpty(mTrbUrl)) && !(string.IsNullOrEmpty(mTrbType)))
                {
                    obTrb = objMisc.GetTributeUrlOnOldTributeUrl(obTrb, WebConfig.ApplicationType.ToString());

                    strStartUrl = string.Format("{0}{1}{2}{3}{4}{5}", "https://www.", WebConfig.TopLevelDomain, "/mobile/index.html?tributeurl=", obTrb.TributeUrl, "&tributetype=", mTrbType);

                        string url = Request.Url.ToString().ToLower();

                        #region story

                        if (url.Contains("story.aspx"))
                            redirctMobileUrl = strStartUrl + "&page=story";
                            #endregion
                            #region notes

                        else if (url.Contains("notes.aspx"))
                            redirctMobileUrl = strStartUrl + "&page=notes";
                            #endregion
                            #region note

                        else if (url.Contains("notefullview.aspx"))
                        {
                            if ((Request.QueryString["noteId"] != null))
                            {
                                if (int.TryParse(Request.QueryString["noteId"], out mTabId))
                                {
                                    redirctMobileUrl = strStartUrl + "&page=note&id=" + mTabId.ToString();
                                }
                                else
                                {
                                    redirctMobileUrl = strStartUrl + "&page=notes";
                                }
                            }
                            else
                            {
                                redirctMobileUrl = strStartUrl + "&page=notes";
                            }
                        }
                            #endregion
                            #region events

                        else if (url.Contains("event.aspx"))
                            redirctMobileUrl = strStartUrl + "&page=events";
                            #endregion
                            #region event

                        else if (url.Contains("eventfullview.aspx"))
                        {
                            if ((Request.QueryString["EventID"] != null))
                            {
                                if (int.TryParse(Request.QueryString["EventID"], out mTabId))
                                {
                                    redirctMobileUrl = strStartUrl + "&page=event&id=" + mTabId.ToString();
                                }
                                else
                                {
                                    redirctMobileUrl = strStartUrl + "&page=events";
                                }
                            }
                            else
                            {
                                redirctMobileUrl = strStartUrl + "&page=events";
                            }
                        }
                            #endregion
                            #region guestbook

                        else if (url.Contains("guestbook.aspx"))
                            redirctMobileUrl = strStartUrl + "&page=guestbook";
                            #endregion
                            #region gift

                        else if (url.Contains("gift.aspx"))
                            redirctMobileUrl = strStartUrl + "&page=memorials";
                            #endregion
                            #region photogallery

                        else if (url.Contains("photogallery.aspx"))
                            redirctMobileUrl = strStartUrl + "&page=gallery";
                            #endregion
                            #region photoalbum

                        else if (url.Contains("photoalbum.aspx"))
                        {
                            if ((Request.QueryString["PhotoAlbumId"] != null))
                            {
                                if (int.TryParse(Request.QueryString["PhotoAlbumId"], out mTabId))
                                {
                                    redirctMobileUrl = strStartUrl + "&page=photoalbum&id=" + mTabId.ToString();
                                }
                                else
                                {
                                    redirctMobileUrl = strStartUrl + "&page=gallery";
                                }
                            }
                            else
                            {
                                redirctMobileUrl = strStartUrl + "&page=gallery";
                            }
                        }
                            #endregion
                            #region photoview

                        else if (url.Contains("photoview.aspx"))
                        {
                            if ((Request.QueryString["PhotoId"] != null))
                            {
                                if (int.TryParse(Request.QueryString["PhotoId"], out mTabId))
                                {
                                    redirctMobileUrl = strStartUrl + "&page=photo&id=" + mTabId.ToString();
                                }
                                else
                                {
                                    redirctMobileUrl = strStartUrl + "&page=gallery";
                                }
                            }
                            else
                            {
                                redirctMobileUrl = strStartUrl + "&page=gallery";
                            }
                        }
                            #endregion
                            #region photoview

                        else if (url.Contains("photoview.aspx"))
                            redirctMobileUrl = strStartUrl + "&page=gallery";
                            #endregion
                            #region managevideo

                        else if (url.ToLower().Contains("managevideo.aspx"))
                        {
                            #region videoTribute

                            if (url.ToLower().Contains("videotype=videotribute"))
                            {
                                redirctMobileUrl = string.Empty;
                            }
                                #endregion

                            else if ((Request.QueryString["videoId"] != null))
                            {
                                if (int.TryParse(Request.QueryString["videoId"], out mTabId))
                                {
                                    redirctMobileUrl = strStartUrl + "&page=video&id=" + mTabId.ToString();
                                }
                                else
                                {
                                    redirctMobileUrl = strStartUrl + "&page=gallery";
                                }
                            }
                            else
                            {
                                redirctMobileUrl = strStartUrl + "&page=gallery";
                            }
                        }
                            #endregion
                            #region videos

                        else if (url.ToLower().Contains("videogallery.aspx"))
                        {
                            redirctMobileUrl = strStartUrl + "&page=gallery";
                        }
                            #endregion

                        else
                        {
                            redirctMobileUrl = strStartUrl + "&page=home";
                        }
                    }

                    #endregion
                
            }
        }
        if (string.IsNullOrEmpty(redirctMobileUrl))
            {
                try
                {

                    PageUrl = GetRedirectUrl();
                    PageTitle = Page.Title.ToString();
                    codedURL = HttpUtility.UrlEncode(PageUrl).ToString();
                    codedtitle = HttpUtility.UrlEncode(PageTitle).ToString();

                    if (Request.QueryString["topurl"] != null)
                    {
                        _TopUrl = Request.QueryString["topurl"].ToString();
                        Response.Cookies["topurl"].Value = _TopUrl;
                        Response.Cookies["topurl"].Domain = _TopUrl;
                        Response.Cookies["topurl"].Expires = DateTime.Now.AddHours(4);
                    }

                    if (Request.Cookies["topurl"] != null)
                    {
                        hdnTopUrl.Value = Request.Cookies["topurl"].Value.ToString();
                    }
                    if (Session["isInIframe"] != null)
                    {
                        isInIframe = bool.Parse(Session["isInIframe"].ToString());
                    }

                    // New code added on 07 june 2011 by rupendra to handle Apple safari problem
                    if (Request.Browser.Browser.ToString().Trim().Equals("AppleMAC-Safari"))
                    {
                    }

                    //LHK:EmptyDivAboveMainPanel
                    StateManager stateTribute = StateManager.Instance;
                    SessionValue objSessvalue =
                        (SessionValue)stateTribute.Get("objSessionvalue", StateManager.State.Session);
                    if ((Request.QueryString["TributeUrl"] != null))
                    {
                        string _trbUrl = Request.QueryString["TributeUrl"].ToString();
                        GetCustomHeaderVisible(_trbUrl, WebConfig.ApplicationType.ToString());
                    }
                    if (!(objSessvalue != null))
                    {
                        if (!IsCustomHeaderOn)
                        {
                            EmptyDivAboveMainPanel.Visible = true;
                        }
                    }
                    //LHK:EmptyDivAboveMainPanel

                    if (WebConfig.ApplicationMode.Equals("local"))
                    {
                        appDomian = WebConfig.AppBaseDomain.ToString();
                    }
                    else
                    {
                        StateManager stateManager = StateManager.Instance;
                        Tributes objTrib = (Tributes)stateManager.Get("TributeSession", StateManager.State.Session);
                        //Ashu 18 aug for session null
                        if (objTrib != null)
                        {
                            if (objTrib.TypeDescription != null)
                            {
                                appDomian = "http://" +
                                            objTrib.TypeDescription.ToString().ToLower().Replace("new baby", "newbaby") +
                                            "." + WebConfig.TopLevelDomain + "/";
                            }
                            else if (Session["PhotoAlbumTributeSession"] != null)
                            {
                                objTrib = Session["PhotoAlbumTributeSession"] as Tributes;
                                if (objTrib.TypeDescription != null)
                                    appDomian = "http://" +
                                                objTrib.TypeDescription.ToString().ToLower().Replace("new baby",
                                                                                                     "newbaby") + "." +
                                                WebConfig.TopLevelDomain + "/";
                            }
                        }
                        else if (Session["PhotoAlbumTributeSession"] != null)
                        {
                            objTrib = Session["PhotoAlbumTributeSession"] as Tributes;
                            if (objTrib != null)
                            {
                                if (objTrib.TypeDescription != null)
                                    appDomian = "http://" +
                                                objTrib.TypeDescription.ToString().ToLower().Replace("new baby",
                                                                                                     "newbaby") + "." +
                                                WebConfig.TopLevelDomain + "/";
                            }
                        }
                    }


                    try
                    {
                        if (Request.QueryString["TributeType"] != null)
                        {
                            ytHeader.TributeType = Request.QueryString["TributeType"].ToString();
                        }

                        // get the Tribute and User detail from the Session           
                        GetValuesFromSession();
                        // Set the Class of the div according the Page Name
                        SetClass();
                        SetTabClass();
                        // This function will set the Left Menu
                        SetMenuOptions();
                        SetMenuItemClass();
                        // This Function will load themes in the left panel and loads the selected theme for the tribute.
                        LoadThemes();
                        //Method to check if tribute already in favorite list.
                        CheckForFavorite();
                        //to set affiliate link.
                        AffiliateLinks(_tributeType);
                        StateManager objStateManager = StateManager.Instance;
                        if (objStateManager.Get("NoteSession", StateManager.State.Session) != null)
                            _noteId =
                                int.Parse(objStateManager.Get("NoteSession", StateManager.State.Session).ToString());
                        if (objStateManager.Get("VideoSession", StateManager.State.Session) != null)
                            _videoId =
                                int.Parse(objStateManager.Get("VideoSession", StateManager.State.Session).ToString());
                        if (objStateManager.Get("PhotoViewSession", StateManager.State.Session) != null)
                            _photoId =
                                int.Parse(objStateManager.Get("PhotoViewSession", StateManager.State.Session).ToString());
                        if (objStateManager.Get("PhotoAlbumId", StateManager.State.Session) != null)
                            _photoAlbumId =
                                int.Parse(objStateManager.Get("PhotoAlbumId", StateManager.State.Session).ToString());
                        if (objStateManager.Get("XmlFilePath", StateManager.State.Session) != null)
                            //to get xml file name for slideshow
                            _xmlFilePath = objStateManager.Get("XmlFilePath", StateManager.State.Session).ToString();
                        //to get photo number from where to start slideshow.
                        if (objStateManager.Get("SlideShowStartPhoto", StateManager.State.Session) != null)
                            //to get start photo number in slideshow.
                            _recordNumber =
                                int.Parse(
                                    objStateManager.Get("SlideShowStartPhoto", StateManager.State.Session).ToString());
                        else
                            _recordNumber = 0;

                        // Set the controls value
                        SetControlsValue();



                        SetPageNameInSession(_typeName);
                        if (!(string.IsNullOrEmpty(_tributeType)))
                        {
                            if (_tributeType == "Anniversary")
                                _themeName = "AnniversaryDefault";
                            else if (_tributeType == "Birthday")
                                _themeName = "BirthdayDefault";
                            else if (_tributeType == "Graduation")
                                _themeName = "GraduationDefault";
                            else if (_tributeType == "Memorial")
                                _themeName = "MemorialDefault";
                            else if (_tributeType == "New Baby")
                                _themeName = "BabyDefault";
                            else if (_tributeType == "Wedding")
                                _themeName = "WeddingDefault";
                        }

                        //LHK: for photo upgrade changes
                        if ((liAdd.Visible == false) && (liEdit.Visible == false) && (liView.Visible == false) &&
                            (liDownloadalbum.Visible == false) && (liVieFullPhoto.Visible == false))
                            divSubTool.Visible = false;
                    }
                    catch (Exception ex)
                    {
                        LogError(ex.Message, ex.StackTrace);
                        throw ex;
                    }
                }
                catch (Exception ex)
                {
                    LogError(ex.Message, ex.StackTrace);
                    throw ex;
                }
            }
            else
            {
                Response.Redirect(redirctMobileUrl, false);
            }
        }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //this.Form.Action = Request.RawUrl;
        System.Diagnostics.Debug.WriteLine("In Tribute/Home -- Page_Load");
         //code for YT Mobile redirections
        string redirctMobileUrl = string.Empty;
        if (!IsPostBack)
        {
            System.Diagnostics.Debug.WriteLine("In Tribute/Home -- Postback");

            DeviceManager deviceManager = new DeviceManager
            {
                UserAgent = Request.UserAgent,
                IsMobileBrowser = Request.Browser.IsMobileDevice
            };

            // Added by Varun Goel on 25 Jan 2013 for NoRedirection functionality
            TributesPortal.Utilities.StateManager stateManager = StateManager.Instance;

            objSessionValue = (SessionValue)stateManager.Get("objSessionvalue", StateManager.State.Session);
            System.Diagnostics.Debug.WriteLine("In Tribute/Home -- Validating");
            if (objSessionValue != null)
                System.Diagnostics.Debug.WriteLine("In Tribute/Home -- Validating redirection:"+ objSessionValue.NoRedirection);
            if (objSessionValue == null || objSessionValue.NoRedirection == null || objSessionValue.NoRedirection == false)
            {
                System.Diagnostics.Debug.WriteLine("In Tribute/Home -- After validation inside if for redirection");
                if (deviceManager.IsMobileDevice())
                {
                    // Redirection URL
                    redirctMobileUrl = string.Format("{0}{1}{2}", "https://www.", WebConfig.TopLevelDomain, "/mobile/Search.html");
                    Response.Redirect(redirctMobileUrl, false);
                }
            }
        }
        if (string.IsNullOrEmpty(redirctMobileUrl))
        {

            // Added by Ashu on Oct 11, 2011
            if (ConfigurationManager.AppSettings["ApplicationType"].ToString().ToLower() == "yourmoments")
            {
                YT2.Attributes["class"] = "blue";
                YT4.Attributes["class"] = "blue";
                // YT5.Attributes["class"] = "";
                YMDiv.Attributes.Add("style", "display:block");
                YTDiv.Attributes.Add("style", "display:none");
                CreateBtn.Attributes["class"] = "actionbuttonBlue";
                YMSlider.Attributes.Add("style", "display:block");
                YTSlider.Attributes.Add("style", "display:none");
                Bottombackground.Attributes.Add("style", "display:block;");
                YTAnnouncement.Attributes.Add("style", "display:none;");
                YT11.InnerHtml = @"Create your own Website for free!";
                HomeTitle.InnerHtml = @"Your Moments Event Websites – Celebrate a wedding, baby, anniversary or other significant
        event.";
            if (TributesPortal.Utilities.WebConfig.TopLevelDomain.ToLower().Contains(".in"))
                LinkOtherDomain = "http://www.yourtribute.in";
            else
                LinkOtherDomain = "http://www.yourtribute.com";

        }
        else if (ConfigurationManager.AppSettings["ApplicationType"].ToString().ToLower() == "yourtribute")
        {
            HomeTitle.InnerHtml = @"Your Tribute - Free Online Obituaries & Premium Memorial Websites";
            YT2.Attributes["class"] = "Purple-MT";
            YT4.Attributes["class"] = "Gray-MT";
           // YT5.Attributes["class"] = "Gray-MT";
            bButtons.Attributes["class"] = "bigButtons-MT";
            YMDiv.Attributes.Add("style", "display:none");
            YTDiv.Attributes.Add("style", "display:block");
            CreateBtn.Attributes["class"] = "actionbuttonPurple";
            YMSlider.Attributes.Add("style", "display:none");
            YTSlider.Attributes.Add("style", "display:block");
            Bottombackground.Attributes.Add("style", "display:none;");
            YTAnnouncement.Attributes.Add("style", "display:block;");
            if (TributesPortal.Utilities.WebConfig.TopLevelDomain.ToLower().Contains(".in"))
                LinkOtherDomain = "http://www.yourtribute.in";
            else
                LinkOtherDomain = "http://www.yourtribute.com";
        }

        //        Session["Site"] = "Moment";
        //        if (Session["Site"] != null)
        //        {
        //            if (Session["Site"].ToString() == "Moment")
        //            {
        //                YTTile.InnerHtml = @"Your Moments Event Websites – Celebrate a wedding, baby or other significant
        //                                   event.";
        //                YT1.InnerHtml = "Your Moments";
        //                YT2.InnerHtml = "What is Your Moment?";
        //                YT3.InnerHtml=@" A web-based tool, that lets you set up a personal website to plan, share
        //                                and remember a significant event or special someone. A Website can be created in
        //                                minutes, but remains online for life to provide an everlasting record of the special
        //                                occasion.";
        //                YT4.InnerHtml = "Why Your Moments?";
        //                YT5.InnerHtml= @"It is easy and elegant. Create a personalized Website for your event in minutes.
        //                                Your Moments includes many of the features of popular online invitation, photo sharing,blogging,
        //                                and social networking websites, in an easy-to-use intuitive interface.";
        //                YT6.InnerHtml = @"Choose from our collection of themes created by our top designers. Multiple themes
        //                                are available for each website type with more added all the time!";
        //                YT7.InnerHtml = @" One-step login using your Facebook account. Invite Facebook friends to your website
        //                                and events and easily publish to your wall in one click.";
        //                YT8.InnerHtml = @"We don’t think you should have to keep paying to keep your important event online.
        //                                Your Moments and all of its content will remain online for life, we guarantee it!";
        //                YT9.InnerHtml = @"Celebrate a significant event or a special someone with Your Moments.";
        //                YT10.InnerHtml = @"Website";
        //                YT11.InnerHtml = @"Create your own Website for free!";
        //                YT12.InnerHtml = "Your Moments";
        //                YT13.InnerHtml = @" Create a personal website  for your significant event in minutes. Send
        //                                    stylish online invitations with RSVP. Add photos and videos and let your friends
        //                                    and family do the same. Receive personal messages in your guestbook as well as virtual
        //                                    gifts. Plus many more easy-to-use features!";
        //                YT14.InnerHtml = @"Create a personal website for your new baby in minutes. Send beautiful
        //                                                online baby anouncements. Share stories and add photos and videos from before and
        //                                                after the birth. Receive personal messages in your guestbook. Plus much more!";
        //                YT15.InnerHtml = "New Baby Website:";
        //                YT16.InnerHtml = @" Create a personal website for your graduation in minutes. Send beautiful
        //                                                grad invites. Add photos from before and after the event. Receive personal messages
        //                                                in your guestbook and virtual gifts. Plus many more easy-to-use features!";
        //                YT17.InnerHtml = "Graduation Website:";
        //                YT18.InnerHtml = @" Create a personal website for your wedding in minutes. Send beautiful
        //                                                online invitations with RSVP. Add photos from before and after the wedding and let
        //                                                your guests do the same. Receive personal messages in your guestbook. Plus much
        //                                                more!";
        //                YT19.InnerHtml = "Wedding Website:";
        //                YT20.InnerHtml=@" Create a personal website for your birthday in minutes. Send stylish
        //                                    online birthday invitations with RSVP. Add photos from before and after the event
        //                                    and let your friends do the same. Receive messages in your guestbook, virtual gifts,
        //                                    and more!";
        //                YT21.InnerHtml = "Birthday Tribute:";
        //                YT22.InnerHtml = @"Create a personal website for your loved one in minutes. Share their
        //                                                story. Send stylish online thank you cards. Add photos and videos and let friends
        //                                                and family do the same. Receive personal messages in the guestbook and much more!";
        //                YT23.InnerHtml = " Memorial Website:";
        //                YT24.InnerHtml = @" Create a personal website (a Tribute) for your anniversary in minutes. Send stylish
        //                                                online invitations. Add photos and videos from before and after the event. Receive
        //                                                personal messages in the guestbook and virtual gifts. Plus many more easy-to-use
        //                                                features!";
        //                YT25.InnerHtml = " Anniversary Tribute:";

        //                lnkCreateBtn.HRef = Session["APP_BASE_DOMAIN"].ToString() + "pricing.aspx";
        //                lnkCreateBtn.Attributes["class"] = "MomentleftBigButton";

        //            }
        //            else
        //            {
        //                YTTile.InnerHtml = @"Your Tribute Event Websites – Celebrate a wedding, baby, memorial or other significant
        //                                     event.";
        //                YT1.InnerHtml = "Your Tribute";
        //                YT2.InnerHtml = "What is Your Tribute?";
        //                YT3.InnerHtml = @" A web-based tool, that lets you set up a personal website (a Tribute) to plan, share
        //                            and remember a significant event or special someone. A Tribute can be created in
        //                            minutes, but remains online for life to provide an everlasting record of the special
        //                            occasion.";
        //                YT4.InnerHtml = "Why Your Tribute?";
        //                YT5.InnerHtml = @"It is easy and elegant. Create a personalized Tribute for your event in minutes.
        //                            Your Tribute includes many of the features of popular online invitation, photo sharing,
        //                            blogging, and social networking websites, in an easy-to-use intuitive interface.";
        //                YT6.InnerHtml=@"Choose from our collection of themes created by our top designers. Multiple themes
        //                                are available for each tribute type with more added all the time!";
        //                YT7.InnerHtml = @" One-step login using your Facebook account. Invite Facebook friends to your tribute
        //                                and events and easily publish to your wall in one click.";
        //                YT8.InnerHtml = @"We don’t think you should have to keep paying to keep your important event online.
        //                                Your Tribute and all of its content will remain online for life, we guarantee it!";
        //                YT9.InnerHtml = @"Celebrate a significant event or a special someone with Your Tribute.";
        //                YT10.InnerHtml = "Tributes";
        //                YT11.InnerHtml = @"Create your own Tribute for free!";
        //                YT12.InnerHtml = "Your Tribute";
        //                YT13.InnerHtml = @" Create a personal website (a Tribute) for your significant event in minutes. Send
        //                                    stylish online invitations with RSVP. Add photos and videos and let your friends
        //                                    and family do the same. Receive personal messages in your guestbook as well as virtual
        //                                    gifts. Plus many more easy-to-use features!";
        //                YT14.InnerHtml = @"Create a personal website (a Tribute) for your new baby in minutes. Send beautiful
        //                                   online baby anouncements. Share stories and add photos and videos from before and
        //                                   after the birth. Receive personal messages in your guestbook. Plus much more!";
        //                YT15.InnerHtml="New Baby Tribute:";
        //                YT16.InnerHtml = @" Create a personal website (a Tribute) for your graduation in minutes. Send beautiful
        //                                    grad invites. Add photos from before and after the event. Receive personal messages
        //                                    in your guestbook and virtual gifts. Plus many more easy-to-use features!";
        //                YT17.InnerHtml = "Graduation Tribute:";
        //                YT18.InnerHtml = @" Create a personal website (a Tribute) for your wedding in minutes. Send beautiful
        //                                    online invitations with RSVP. Add photos from before and after the wedding and let
        //                                    your guests do the same. Receive personal messages in your guestbook. Plus much
        //                                    more!";
        //                YT19.InnerHtml = "Wedding Tribute:";
        //                YT20.InnerHtml = @" Create a personal website (a Tribute) for your birthday in minutes. Send stylish
        //                                    online birthday invitations with RSVP. Add photos from before and after the event
        //                                    and let your friends do the same. Receive messages in your guestbook, virtual gifts,
        //                                    and more!";
        //                YT21.InnerHtml = "Birthday Tribute:";
        //                YT22.InnerHtml = @"Create a personal website (a Tribute) for your loved one in minutes. Share their
        //                                    story. Send stylish online thank you cards. Add photos and videos and let friends
        //                                    and family do the same. Receive personal messages in the guestbook and much more!";
        //                YT23.InnerHtml = " Memorial Tribute:";
        //                YT24.InnerHtml = @" Create a personal website (a Tribute) for your anniversary in minutes. Send stylish
        //                                                online invitations. Add photos and videos from before and after the event. Receive
        //                                                personal messages in the guestbook and virtual gifts. Plus many more easy-to-use
        //                                                features!";
        //                YT25.InnerHtml = " Anniversary Tribute:";

            //                lnkCreateBtn.HRef= Session["APP_BASE_DOMAIN"].ToString() + "pricing.aspx";
            //                lnkCreateBtn.Attributes["class"]="leftBigButton";
            //            }
            //        }
        }

        else
        {
            Response.Redirect(redirctMobileUrl, false);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            // get the User detail and search Parameter from the Session
            GetValuesFromSession();

            // Set the controls value
            SetControlsValue();

            if (!this.IsPostBack)
            {
                //this._presenter.OnViewInitialized();
                this._presenter.GetTributeTypeList(ConfigurationManager.AppSettings["ApplicationType"].ToString().ToLower());

                // Search for tribute
                this._presenter.Search(ConfigurationManager.AppSettings["ApplicationType"].ToString().ToLower());

                SetSelection();

                //code for YT Mobile redirections
                string redirctMobileUrl = string.Empty;

                DeviceManager deviceManager = new DeviceManager
                {
                    UserAgent = Request.UserAgent,
                    IsMobileBrowser = Request.Browser.IsMobileDevice
                };

                // Added by Varun Goel on 25 Jan 2013 for NoRedirection functionality
                TributesPortal.Utilities.StateManager stateManager = StateManager.Instance;

                objSessionValue = (SessionValue)stateManager.Get("objSessionvalue", StateManager.State.Session);
                if (objSessionValue == null || objSessionValue.NoRedirection == null || objSessionValue.NoRedirection == false)
                {
                    if (deviceManager.IsMobileDevice())
                    {
                        // Redirection URL
                        redirctMobileUrl = string.Format("{0}{1}{2}", "https://www.", WebConfig.TopLevelDomain, "/mobile/SearchResult.html");
                    }
                }
            }

            // Set controls visibility on the basis of search result count
            SetControlsVisibility();

            this._presenter.OnViewLoaded();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Page.Title = "Contact Your " + ConfigurationManager.AppSettings["ApplicationWord"].ToString();
        if (!this.IsPostBack)
        {
            //code for YT Mobile redirections
            string redirctMobileUrl = string.Empty;

            DeviceManager deviceManager = new DeviceManager
            {
                UserAgent = Request.UserAgent,
                IsMobileBrowser = Request.Browser.IsMobileDevice
            };

            // Added by Varun Goel on 25 Jan 2013 for NoRedirection functionality
            TributesPortal.Utilities.StateManager stateManager = StateManager.Instance;

            objSessionValue = (SessionValue)stateManager.Get("objSessionvalue", StateManager.State.Session);
            if (objSessionValue == null || objSessionValue.NoRedirection == null || objSessionValue.NoRedirection == false)
            {
                if (deviceManager.IsMobileDevice())
                {
                    // Redirection URL
                    redirctMobileUrl = string.Format("{0}{1}{2}", "https://www.", WebConfig.TopLevelDomain, "/mobile/ContactUs.html");
                    Response.Redirect(redirctMobileUrl, false);
                }
            }
        }
    }
Example #5
-1
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            //code for YT Mobile redirections
            string redirctMobileUrl = string.Empty;

            DeviceManager deviceManager = new DeviceManager
            {
                UserAgent = Request.UserAgent,
                IsMobileBrowser = Request.Browser.IsMobileDevice
            };

            // Added by Varun Goel on 25 Jan 2013 for NoRedirection functionality
            TributesPortal.Utilities.StateManager stateManager = StateManager.Instance;

            objSessionValue = (SessionValue)stateManager.Get("objSessionvalue", StateManager.State.Session);
            if (objSessionValue == null || objSessionValue.NoRedirection == null || objSessionValue.NoRedirection == false)
            {
                if (deviceManager.IsMobileDevice())
                {
                    // Redirection URL
                    redirctMobileUrl = string.Format("{0}{1}{2}", "https://www.", WebConfig.TopLevelDomain, "/mobile/Tour.html");
                    Response.Redirect(redirctMobileUrl, false);
                }
            }

        }
        if (ConfigurationManager.AppSettings["ApplicationType"].ToString().ToLower() == "yourmoments")
        {
            yourtribute.Visible = false;
            yourmoments.Visible = true;
            tourTitle.InnerHtml=@"Tour - See how to create a Website for your significant event";
        }
        else if (ConfigurationManager.AppSettings["ApplicationType"].ToString().ToLower() == "yourtribute")
        {
            yourtribute.Visible = true;
            yourmoments.Visible = false;
        }
    }