示例#1
0
    public AjaxAskAFriend GenarateAjaxAskAFriend()
    {
        AjaxAskAFriend ajaxAskAFriend = new AjaxAskAFriend();

        ajaxAskAFriend.WebAskAFriendID = CurrentAskAFriend.WebAskAFriendID;

        ajaxAskAFriend.Question = CurrentAskAFriend.Question;

        ajaxAskAFriend.LastAAF = GenarateResult(LastAskAFriend);

        ajaxAskAFriend.Comments = GenarateComments(CurrentAskAFriend);

        ajaxAskAFriend.Bookmarks = GenarateBookmarks(CurrentAskAFriend);

        //ajaxAskAFriend.CommentPost = GenarateCommentPost(CurrentAskAFriend);

        ajaxAskAFriend.HTML = GenarateAnswers(CurrentAskAFriend) + GenaratePermaLink(CurrentAskAFriend);

        return(ajaxAskAFriend);
    }
    public AjaxAskAFriend GenarateAjaxAskAFriend()
    {
        AjaxAskAFriend ajaxAskAFriend = new AjaxAskAFriend();

        ajaxAskAFriend.WebAskAFriendID = CurrentAskAFriend.WebAskAFriendID;

        ajaxAskAFriend.Question = CurrentAskAFriend.Question;

        ajaxAskAFriend.LastAAF = GenarateResult(LastAskAFriend);

        ajaxAskAFriend.Comments = GenarateComments(CurrentAskAFriend);

        ajaxAskAFriend.Bookmarks = GenarateBookmarks(CurrentAskAFriend);

        //ajaxAskAFriend.CommentPost = GenarateCommentPost(CurrentAskAFriend);

        ajaxAskAFriend.HTML = GenarateAnswers(CurrentAskAFriend) + GenaratePermaLink(CurrentAskAFriend);

        return ajaxAskAFriend;
    }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUrl = @"signup.aspx?u=" + Request.Url.AbsoluteUri;

        AjaxPro.Utility.RegisterTypeForAjax(typeof(AskAFriendPage));
        Comments1.CommentType = CommentType.AskAFriend;

        string Return = Request.Params["return"];

        if (Return != null)
        {
            ReturnToDash = "true";
        }

        //int t=0;

        //if(Session["t"]!=null)
        //{
        //    t=(int)Session["t"];
        //    t++;
        //    Session["t"]=t;
        //}
        //else
        //{
        //    Session["t"]=0;
        //}

        //lblT.Text= t.ToString();

        try
        {
            //string strAAFQuestion = Request.Params["q"];

            AskAFriend askAFriend = null;

            askAFriend = ExtractPageParams.ExtractAskAFriendFromURL(this.Page, this.Context);


            if (askAFriend != null)
            {
                CurrentAskAFriend = askAFriend;

                LastAskAFriend = CurrentAskAFriend;

                IsPermalink = true;

                InitialAAF            = GenarateAjaxAskAFriend();
                AskAFriendWebId       = InitialAAF.WebAskAFriendID;
                Comments1.ObjectWebId = AskAFriendWebId;
                return;
            }
        }
        catch
        {
            return;
        }

        InitialAAF = NextQuestion();

        AskAFriendWebId = CurrentAskAFriend.WebAskAFriendID;

        Comments1.ObjectId    = CurrentAskAFriend.AskAFriendID;
        Comments1.ObjectWebId = CurrentAskAFriend.WebAskAFriendID;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUrl = @"signup.aspx?u=" + Request.Url.AbsoluteUri;

        AjaxPro.Utility.RegisterTypeForAjax(typeof(AskAFriendPage));
        Comments1.CommentType = CommentType.AskAFriend;

        string Return = Request.Params["return"];

        if (Return != null)
        {
            ReturnToDash = "true";
        }

        //int t=0;

        //if(Session["t"]!=null)
        //{
        //    t=(int)Session["t"];
        //    t++;
        //    Session["t"]=t;
        //}
        //else
        //{
        //    Session["t"]=0;
        //}

        //lblT.Text= t.ToString();

        try
        {

            //string strAAFQuestion = Request.Params["q"];

            AskAFriend askAFriend = null;

            askAFriend = ExtractPageParams.ExtractAskAFriendFromURL(this.Page, this.Context);


            if (askAFriend != null)
            {
                CurrentAskAFriend = askAFriend;

                LastAskAFriend = CurrentAskAFriend;

                IsPermalink = true;

                InitialAAF = GenarateAjaxAskAFriend();
                AskAFriendWebId = InitialAAF.WebAskAFriendID;
                Comments1.ObjectWebId = AskAFriendWebId;
                return;
            }
        }
        catch
        {
            return;
        }

        InitialAAF = NextQuestion();

        AskAFriendWebId = CurrentAskAFriend.WebAskAFriendID;

        Comments1.ObjectId = CurrentAskAFriend.AskAFriendID;
        Comments1.ObjectWebId = CurrentAskAFriend.WebAskAFriendID;

    }