Error converting data type nvarchar to int in ASP.Net

Last Reply 24 days ago By dharmendr

Posted 24 days 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 24 days ago.
Posted 24 days ago
akhter says:
txtq.Text.Trim()

 You txtq value is having alphabets. So the error.

Please verify it and pass only integer value.