摘要:
1.绑定时格式化日期方法: <ASP:BOUNDCOLUMN DATAFIELD= "JoinTime " DATAFORMATSTRING= "{0:yyyy-MM-dd} " > <ITEMSTYLE WIDTH= "18% " > </ITEMSTYLE > </ASP:BOUNDCOLUMN >2.数据控件如DataGrid/DataList等的件格式化日期方法: e.Item.Cell[0].Text = Convert.ToDateTime(e.Item.Cell[0].Te 阅读全文
posted @ 2013-01-02 11:28
疯狂的阿林
阅读(158)
评论(0)
推荐(0)
摘要:
aspx页面上有三个DropDownList控件, DropDownList1 表示年,DropDownList2表示月,DropDownList3表示天; 注意用将这三个DropDownList控件的AutoPostBack属性设为True。 用户可以方便地选择年月日,并且每月的日期会随着用户选择不同的年,月而发生相应的变化 其后台cs文件代码如下: private void Page_Load(object sender, System.EventArgs e) { DateTime tnow=DateTime.Now;//现在时间 ArrayList AlYear=new ArrayLi 阅读全文
posted @ 2013-01-02 10:45
疯狂的阿林
阅读(326)
评论(0)
推荐(0)

浙公网安备 33010602011771号