Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (PollId == 0)
        {
            return;
        }
        PollFormView.Visible = (Config.ActivePoll > 0 || PollId > 0);

        TopicInfo topic = (TopicInfo)Post;

        var polls = new List <PollInfo> {
            Polls.GetTopicPoll(PollId)
        };

        PollFormView.DataSource = polls;
        PollFormView.DataBind();
        Literal user = (Literal)PollFormView.FindControl("postedBy");

        if (user != null)
        {
            user.Text = "Asked by " + topic.AuthorProfilePopup;
        }
        buttonBar.Post = Post;
        //popuplink.Text = String.Format("<a href='{0}' title='{1}'>{2}</a>", topic.AuthorProfileLink, String.Format(Resources.webResources.lblViewProfile,topic.AuthorName), topic.AuthorName);
        //AuthorProfile.AuthorId = topic.AuthorId;
        msgBody.Text = topic.Message.ReplaceNoParseTags().ParseVideoTags().ParseWebUrls();
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        PollFormView.Visible = (Config.ActivePoll > 0 || ViewState["PollID"] != null);
        if (PollId == 0)
        {
            return;
        }

        var polls = new List <PollInfo> {
            Polls.GetTopicPoll(PollId)
        };

        PollFormView.DataSource = polls;
        PollFormView.DataBind();
    }