现在我只剩下一个完整的空白,但我很想知道我如何这样做:
我需要将林克数据插入如下内容,但并不肯定如何从线上获取2套数据。
<ul>
<li>database value one</li>
<li>database value two</li>
<ul>
我举了一个例子,说明我试图做些什么:
foreach (blog_post h in recentBlogData)
{
recentString = recentString + "<ul>";
DateTime blogDate = DateTime.Parse(h.blogPublishDate.ToString());
recentString = recentString +
"<li>" +
"<div class="date"><span>" + blogDate.ToString("%d") + "</span>" + blogDate.ToString("MMM").ToLower() + "</div>" +
"<strong><a href="" + s.getURL("SITE") + "/news/" + h.blogPostId + "/" + g.clean(h.blogPostTitle).ToLower() + "">" + h.blogPostTitle + "</a></strong>" +
"<div class="cl"></div>" +
"<p>" + h.blogReadMore + "<br />" +
"</p>" +
"</li>";
//this needs to be the next record.
recentString = recentString +
"<li>" +
"<div class="date"><span>" + blogDate.ToString("%d") + "</span>" + blogDate.ToString("MMM").ToLower() + "</div>" +
"<strong><a href="" + s.getURL("SITE") + "/news/" + h.blogPostId + "/" + g.clean(h.blogPostTitle).ToLower() + "">" + h.blogPostTitle + "</a></strong>" +
"<div class="cl"></div>" +
"<p>" + h.blogReadMore + "<br />" +
"</p>" +
"</li>";
recentString = recentString + "</ul>";
}
卡车