I have a dropdownlist and I am trying to insert the DataValueField into a database table. The DataValueField is retrieved from the database and the data type for the column is INT. However, when the run the query I get this error message
Conversion failed when converting the nvarchar value 'meetingId' to data type int.
string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
string updateSql = "UPDATE Project_Meeting SET meetingMinute = @meetingMinute WHERE meetingId = @MeetingId"; ;
using (SqlConnection myConnection = new SqlConnection(connectionString))
SqlCommand myCommand = new SqlCommand(updateSql, myConnection);
myCommand.Parameters.AddWithValue("@meetingMinute", "postUpload/" + filename);
However, when I try
I get this error:
Input string was not in a correct format.