如何为Calendar某些日期上加上背景图片?
private void Calendar1_DayRender(object sender,System.Web.UI.WebControls.DayRenderEventArgs e)
{
if(...)
{
e.Cell.Style= "background:url( 'pic.png ') ";
}
}
为什么不行?
或
e.Cell.CssClass= "getPic ";
.getPic
{
background:url( "pic.png ");
}
还是不行.
请问问题在哪?
------解决方案--------------------写的土一点:
if(...)
{
e.Cell.Attribute[ "background "]=
"http://png.52design.com/jdxt/pic/52design.com_jdxt_001.png ";
}