Sorry, maybe I'm getting you wrong. Are you creating the calendar on runtime
and adding it to the placeholder? Problem can be that you don't create the
calendar on each postback and add the event to it. In this case, the event
binding will get lost. Try this;
protected PlaceHolder plHolder;
protected System.Web.UI.WebControls.PlaceHolder PlaceHolder1;
protected Calendar cal;
private void Page_Load(object sender, System.EventArgs e)
{
cal = new Calendar();
cal.SelectionChanged +=new EventHandler(cal_SelectionChanged);
plHolder.Controls.Add(cal);
}
private void cal_SelectionChanged(object sender, EventArgs e)
{
Response.Output.Write(cal.SelectedDate.ToString()) ;
}
I tested and it works.
Hope this works,
Ethem
"Trond Wahlstrom" wrote:
Thanks for your reply Ethem. But you can't set autopostback true/false
on calendarobjects, can you?
Anyway, the page gets postbacked when selecting a date, but the event
and hence my eventhandler function doesn't run.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!