using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(Calendar1.SelectedDate);
}
protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
{
Response.Write("1st");
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
Calendar1.SelectedDate = DateTime.Now;
}
}
In the above event i used break point at page_load and calender_selectionchanged when i click any date on calender it first goes to page_load then to calender1_selectionchanged instead it should be in reverse order.
Also there is problem regarding selected date when i check in properties it shows correct date i.e. today’s date 29/01/2011 .But when i print it it prints 1/1/0001
Loadalways becomes beforeSelectionChanged(a “postback event”). Why do you think they should occur in reverse order?