GridView和FormView中对时间的末尾处理

在FormView中,要去掉TextBox中显示的时间末尾值,具体时间:秒,分,时的处理方法如下:
Bind("StartDate","{0:yyyy-MM-dd}")
在GridView中,要去掉一列中显示的时间末尾值,具体时间:秒,分,时的处理方法如下:
DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False"

 
Button btnStart = (Button)e.Item.FindControl("btnStart");
btnStart.OnClientClick = "return showCalendarAt('" + txtStart.ClientID + "','y-m-d',0,0)";

posted on 2007-06-25 08:27  wanglinBlog  阅读(280)  评论(0编辑  收藏  举报

导航