muthukumar

muthukumar

  • NA
  • 0
  • 100.8k

display in label

Dec 4 2013 2:37 AM
public int Age(DateTime dt)
{
DateTime today = DateTime.Today;
int age = today.Year - dt.Year;
if (dt > today.AddYears(-age))
age--;
return age;


}

protected void TextBox1_TextChanged(object sender, EventArgs e)
{
int age = Age(Convert.ToDateTime(TextBox1.Text));
Response.Write("Age:"+age);


}
}



here i want to display a returned age in label and also store in storedprocedure


i want query and code to display in label 




thanks


Answers (1)