namespace EmpInfo
{
class ModalDetail{
[Key,PrimaryKey,Not Null]
public int EmpId {get; set;}
[DisplayName("Name")]
[Required(ErrorMessage="Enter the Name")]
public string Name {get;set;}
[Range(18,60,ErrorMessage("The Age must between 18-60"))]
public Date DOB {get; set;}
[DisplayName("Image")]
public string photo {get; set;}
}
<html>
<head>
</head>
<body>
<form>
</body>
class DetailsController: Controller
public ActionResult Index(){
return view();