hello please I have application in aspnet mvc
my model is
[Range(1, 31, ErrorMessage = "Date between 1 to 31")]
public int? Day
{
get; set;
}
[Range(1, 12, ErrorMessage = "Month between 1 to 12")]
public int Month
{
get; set;
}
public int Year
{
get; set;
}
public bool isFullBirthDay { get; set; }
and this my controller
if (data.isFullBirthDay)
{
if (!data.Day.HasValue)
{
ModelState.AddModelError("Day", "Please enter day value");
return View(oPost);
}
else
{
if (data.Day.HasValue && (data.Day.Value < 1 || data.Day.Value > 31))
{
ModelState.AddModelError("Day", "Please enter day value");
return View(oPost);
}
}
if (data.Month < 1 || data.Month > 12)
{
ModelState.AddModelError("Month", "Please enter proper month");
return View(oPost);
}
//check for leap year
}
else
{
if (data.Month < 1 || data.Month > 12)
{
ModelState.AddModelError("Month", "Please enter proper month");
return View(oPost);
}
}
my need is how display in date DD/MM/YYYY
in view because I have this fields separate

Nitin SontakkeRank #264 · 9.6K reputationPosted Jun 25, 2018, 2:42 AM EDT
Bryian TanRank #396 · 6.3K reputationPosted Jun 25, 2018, 7:23 PM EDT
malak laghoz63 reputationPosted Jun 27, 2018, 6:43 AM EDT