hi to all,
i'm new for MVC so kindly explain me how to validate unique key for Branch_code field.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
jothi kumarPosted Jul 19, 2014, 10:01 AM
jothi kumarPosted Jul 19, 2014, 6:18 AM
Ramesh MaruthiPosted Jul 18, 2014, 11:45 AM
{
[Key]
public int Branch_code{ get; set; }
}
if that doesn't works try in this way
srujana thallamPosted Jul 18, 2014, 10:00 AM
If you want to validate Branch_code field in View page you can define there or you can give validation message at model also.
In model you can define like this.