I have made unique keys for four columns in sql server -
I want that I want to check this uniqueness in asp.net c# (front-end)...
I want to know which approach is better - back-end keys or front-end checking ??
Because, the record gets updated ..
Eg - I select a record from Gridview , and make the EmployeeID, SubjectID, same - still - instead of giving error, it gets updated.
How to stop the updation at this point ?
Please guide and help !
Also, I received a reply -
Hi ,
if you have to check the uniqueness of more then a column so you should have to check from back end with stored procedure, Proc make it fast to check
Please guide further... Please help

Shubham KumarRank #621 · 3.8K reputationPosted Feb 17, 2016, 8:44 PM EST
- Open the design table tab
- Highlight your two or more INT fields (Ctrl/Shift+click on the grey blocks in the very first column)
- Right click -> Set primary key
or from query like thisShubham KumarRank #621 · 3.8K reputationPosted Feb 17, 2016, 8:24 PM EST
Riddhi ValechaRank #794 · 2.9K reputationPosted Feb 17, 2016, 8:35 PM EST
Riddhi ValechaRank #794 · 2.9K reputationPosted Feb 19, 2016, 8:36 AM EST
Shubham KumarRank #621 · 3.8K reputationPosted Feb 19, 2016, 6:26 PM EST
Riddhi ValechaRank #794 · 2.9K reputationPosted Mar 14, 2016, 1:04 AM EDT
Shubham KumarRank #621 · 3.8K reputationPosted Mar 14, 2016, 2:03 AM EDT