Error converting data type nvarchar to int in ASP.Net

Last Reply 7 months ago By dharmendr

Posted 7 months ago

when i am inserting record into db then this exception is coming 

Error converting data type nvarchar to int.

cmd.Parameters.AddWithValue("@pro_status", int.Parse(txtq.Text.Trim()));
You are viewing reply posted by: dharmendr 7 months ago.
Posted 7 months ago
akhter says:
txtq.Text.Trim()

 You txtq value is having alphabets. So the error.

Please verify it and pass only integer value.