我正在为子文本创建自己的皮肤,并且有一件事我无法弄清楚...我怎样才能获得发布日期(带永久链接)和评论计数链接到帖子评论格式化我想要的?
在基础皮肤中,就是这样:
<asp:literal id="PostDesc" runat="server" />
生成类似这样的内容:posted @ Thursday, July 29, 2010 2:13 AM | Feedback (0)
我如何让这看起来像Phill Haack在他的网站上的内容(http://haacked.com)?
答案 0 :(得分:1)
经过数小时的研究,试验和错误以及浏览子文本源代码后发现。
<asp:HyperLink runat="server" NavigateUrl='<%#string.Format("{0}#feedback", Url.EntryUrl((IEntryIdentity)Container.DataItem)) %>'>View comments (<%#Eval("FeedBackCount") %>)</asp:HyperLink>
对于评论计数,我会用日期做类似的事情。