阅读背景:

在insertitemtemplate中将asp.net文本框字符串值转换为datetime

来源:互联网 

I am getting an cast exception when my formview attempts an insert of a record that has a string date that needs to go into a datetime column in SQL Server. The field is bound to the table column using the Bind method, and is a part of the InsertItemTemplate of the FormView. I am not sure how to convert the string to datetime during the insert. I thought maybe using the Insert Command to Convert(datetime, @PDate, 101)? That did not take care of the problem.I am getting an cast exception when my formview




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: