Go homepage(回首页) Upload pictures (上传图片) Write articles (发文字帖)
The author:(作者)归海一刀published in(发表于) 2014/1/30 1:22:17 asp.net新闻标题后加new图片_[Asp.Net教程]
asp.net2.0中,使用gridview显示新闻标题,如何在当日新加新闻的标题后加一个new或图片 在后台或者公共类Common写如下类
public static string News_Pic(DateTime T) { if (T.Date == DateTime.Now.Date) { return \"Images/New.gif\"; ; } else { return \"Images/No.gif\"; } }
前台页面调用
模板里调用\" width=\"22\" height=\"9\" />
赞