本文整理汇总了C#中Post.get_DisplayImage方法的典型用法代码示例。如果您正苦于以下问题:C# Post.get_DisplayImage方法的具体用法?C# Post.get_DisplayImage怎么用?C# Post.get_DisplayImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Post
的用法示例。
在下文中一共展示了Post.get_DisplayImage方法的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;
}
}