Hi guys, my calendar is not working as expected if i placed it inside the UpdatePanel. (SelectionChanged is not firing)
It's working fine if without the UpdatePanel. Please advise.
HTML
<form id="form1" runat="server"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><div><asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate><asp:Calendar ID="Calendar" runat="server"> <SelectedDayStyle BackColor="#CC3333" ForeColor="White" /></asp:Calendar> </ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="Calendar" EventName="SelectionChanged" /></Triggers></asp:UpdatePanel></div></form>
Code Behind
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack = False Then
Me.Calendar.SelectedDate = DateTime.Now.Date
End If
End Sub
Protected Sub Calendar_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calendar.SelectionChanged
Response.Write(Me.Calendar.SelectedDate)
End Sub