How to check uniq constraint on update/ insert in gridview?
<p>I have a simple gridview and sqldatasource to bind data to gridview  , SqlDatabase 
I'm trying to set to a column a constraint for unique so If I add new row or update a row and the value already exists It won't update.</p>

<p>For the column Name , I set ->Indexes/keys -> new -> choosed column Name -> Unique key .</p>

<p>How can I get the error when it says already exists , in a label?</p>

<p>thanks</p>
