Create a Project name it "Dateandtime," and setting up Default.aspx with the following Server Controls, and programmatic IDs:
- birthdayTextBox
- daysonEarthButton
- birthDay
- resultLablel
Default.aspx -Set Up Web Control View:
Default.aspx.cs - CodeBehind:
Under the daysonEarthButton click event
Under the daysonEarthButton click event
Default.aspx.cs
1.Click DaysonEarth Button : This calculates and returns the total number of days you have spent on earth.
2.Click BirthDay Button: This shows your birthday either, Sunday, Monday , Tuesday, Wednesday, Thursday, Friday or Saturday.
Tip:The date here – 09/04/2012 – happens to be my Daughter's birthday, which I know occurred on a Tuesday. You may find it more interesting to input your own birthday to see what day you were born on.
Good luck. Follow us and subscribe to more tutorials.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.