当前位置: 首页>>代码示例>>C#>>正文


C# Post.get_post_Full方法代码示例

本文整理汇总了C#中Post.get_post_Full方法的典型用法代码示例。如果您正苦于以下问题:C# Post.get_post_Full方法的具体用法?C# Post.get_post_Full怎么用?C# Post.get_post_Full使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Post的用法示例。


在下文中一共展示了Post.get_post_Full方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: getPosts

    public void getPosts()
    {
        DataTable DT = theCake.getPosts(Int32.Parse(Request.QueryString["ID"].ToString()));

        if (DT.Rows.Count > 0)
        {
            foreach (DataRow DR in DT.Rows)
            {
                Post pst = new Post(Int32.Parse(DR["postID"].ToString()));
                int uID = pst.get_postBy();
                string postBlock = "";

                postBlock += "<div class=\"widget\">" +
                    "<table width=\"100%\">" +
                        "<tr>" +
                            "<td width=\"10%\" class=\"widget\" align=\"center\" valign=\"top\">" +
                                "<a href=\"UserProfile.aspx?userID=" + uID.ToString() + "\">" + pst.get_DisplayName() + "</a>" + "<br />" +
                                "<img src=\"" + pst.get_DisplayImage() + "\" />" +
                            "</td>" +
                            "<td width=\"90%\" style=\"vertical-align:top; margin:5px;;font-size:.8em;\">" +
                                "<strong>Posted:</strong> " + pst.get_createdTimestamp().ToShortDateString() + " " + pst.get_createdTimestamp().ToShortTimeString() +
                            "<hr style=\"margin:1px;\" />" +
                            "<p style=\"font-size:1.1em;\">" + pst.get_post_Full() + "</p>" +
                            "</td>" +
                        "</tr>" +
                    "</table>" +
                "</div>";

                //postBlock += "<div class=\"widget\">" +
                //    "<section style=\"display:table;\">" +
                //        "<section style=\"display:inline-block;\" width=\"8%\">" +
                //            "<div class=\"widget\" align=\"center\">" +
                //                "<a href=\"UserProfile.aspx?userID=" + uID.ToString() + "\">" + pst.get_DisplayName() + "</a>" + "<br />" +
                //                "<img height=\"100px\" width=\"100px\" src=\"" + pst.get_DisplayImage() + "\" />" +
                //            "</div>" +
                //        "</section>" +
                //        "<section style=\"display:inline-block; vertical-align:top; margin:5px; width:85%;\">" +
                //            "<div style=\"font-size:.8em;\">" +
                //                "<strong>Posted:</strong> " + pst.get_createdTimestamp().ToShortDateString() + " " + pst.get_createdTimestamp().ToShortTimeString() +
                //            "</div>" +
                //            "<hr style=\"margin:1px;\" />" +
                //            "<p style=\"font-size:1.1em;\">" + pst.get_post_Full() + "</p>" +
                //        "</section>" +
                //    "</section>" +
                //"</div>";

                lit_Posts.Text += postBlock;

            }
        }
        else
        {
            string postBlock = "";

            postBlock += "<div class=\"widget\">" +
                "<section style=\"display:table;\">" +
                    "<section style=\"display:inline-block;\">" +
                        "<div class=\"widget\" align=\"center\">" +
                            "System Monkey<br />" +
                            "<img height=\"100px\" width=\"100px\" src=\"http://placekitten.com/100/100\" />" +
                        "</div>" +
                    "</section>" +
                    "<section style=\"display:inline-block; vertical-align:top; margin:5px; width:100%-100px;\">" +
                        "<div style=\"font-size:.8em;\">" +
                            "<strong>Posted:</strong> Never Occurred!" +
                        "</div>" +
                        "<hr style=\"margin:1px;\" />" +
                        "<p style=\"font-size:1.1em;\">No posts have occurred here yet.  Feel free to post something...</p>" +
                    "</section>" +
                "</section>" +
            "</div>";

            lit_Posts.Text += postBlock;
        }
    }
开发者ID:Ravai,项目名称:honey-badger,代码行数:75,代码来源:Threads.aspx.cs


注:本文中的Post.get_post_Full方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。