First , if its primary key you need not to insert any value for it, but if any other than that you need to check then you can make a check into database itself.
In database side:
CREATE PROCEDURE Sb_inserupdate
(
@Idcol int
)
AS
BEGIN
IF EXISTS (SELECT 1 FROM yourtable WHERE Idcol = @Idcol)
SELECT 0
ELSE
SELECT 1
END
GO
Coding side:
using (SqlConnection con = new SqlConnection(constr))
{
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "Sb_inserupdate";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Idcol", clientID);
Int32 val = Convert.ToInt32(cmd.ExecuteScalar());
if (val ==0)
{
}
else
{
}