Today i will tell you how to retrieve day from date using C#.Net.
In the Previous articles i explained how to get security answer in asp.net, how to retrieve logged in user name in asp.net, how to retrieve logged in user email in asp.net, where to place google analytics tracking code and many more about ASP.Net.
Today or in future you will have to get day from date for programming purpose.
Drag and Drop one button and a textBox control from toolbox into Form.
Write below line of code on click event of button.
textBox1.Text = DateTime.Now.Day.ToString();
Here what we are doing is getting day from current date of server.