//GridView的时间设置问题。
1. 在GridView的编辑列窗口中,设置时间显示的格式为:{0:yyyy-MM-dd}。
2. 在源码状态下,在该列的代码中加入该属性:HtmlEncode="false"。
代码如下:
<asp:BoundField DataField="UpdateTime" DataFormatString="[{0:yyyy/MM/dd}]" HeaderText="时间" HtmlEncode="false" SortExpression="UpdateTime">
<ItemStyle CssClass="STYLE2" Width="120px" HorizontalAlign="Right" />
<HeaderStyle Width="120px" Font-Size="Smaller" />
</asp:BoundField>