时间字段 输入空值显示为1900-1-1的解决办法,在asp.net 后台处理
string DateEndLast ="'"+ txtDateEndLast.Value+"'";
if (txtDateEndLast.Value.Trim() == "")
{
DateEndLast = "null";
}
string sql = "update DB_****t set style='" + style + "',ClientID='" + ClientID + "',Title='" + Title + "',DateStart='" + DateStart + "',DateEnd='" + DateEnd + "',DateEndLast=" + DateEndLast + " where id=" + id + "";
执行语句 时 进行替换 即可保存。