Ok Vasanth you can try this
protected void OnCalculateAge(object sender, EventArgs e)
{
DateTime dateOfBirth = new DateTime();
int currentYear, currentMonth, birthMonth, birthYear, years, months;
dateOfBirth = Convert.ToDateTime(txtDateOfBirth.Text);
currentYear = Convert.ToInt32(DateTime.Now.Year);
currentMonth = Convert.ToInt32(DateTime.Now.Month);
birthYear = Convert.ToInt32(dateOfBirth.Year);
birthMonth = Convert.ToInt32(dateOfBirth.Month);
years = currentYear - birthYear;
if ((currentMonth - birthMonth > 0))
{
months = Convert.ToInt32(currentMonth - birthMonth);
}
else
{
years = years - 1;
months = Convert.ToInt32((12 - birthMonth) + currentMonth);
}
txtAge.Text = years.ToString() + "/" + months.ToString();
}