当我得到以下错误时,我试图将每个列表框项的列表框项和文本框值插入到数据库中.
如果我尝试插入列表框项目只有我成功,但当我尝试插入文本框值时,我得到此错误.你能告诉我我做错了吗?
Error Message: Object must implement IConvertible. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Object must implement IConvertible. Source Error: Line 60: Line 61: Line 62: cmd.ExecuteNonQuery(); Line 63: Line 64:
c#CODE
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Specialized;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls; …
Run Code Online (Sandbox Code Playgroud)