I want to have a calendar where a date selection causes a user to be redirected to an appropriate page. So, I set AutoPostBack="true" for the RadCalendar control and handle the SelectionChanged event on the server-side. Although, if user navigates from the page back to the calendar and hover the mouse over the previously selected date it appears selected.
How to replicate...
Markup:
Codebehind:
When the user presses the browser back button I want the calendar to be "fresh" and not have the hidden selection.
Thanks.
How to replicate...
Markup:
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title>Untitled Page</title> |
| <meta http-equiv="expires" content="-1" /> |
| <meta http-equiv="Pragma" content="no-cache" /> |
| </head> |
| <body> |
| <form runat="server"> |
| <asp:ScriptManager runat="server" /> |
| <telerik:RadCalendar ID="RadCalendar1" runat="server" AutoPostBack="true" /> |
| </form> |
| </body> |
| </html> |
Codebehind:
| Private Sub RadCalendar1_SelectionChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.SelectedDatesEventArgs) Handles RadCalendar1.SelectionChanged |
| Dim d As String = e.SelectedDates(0).Date.ToShortDateString() |
| RadCalendar1.SelectedDates.Clear() |
| Response.Redirect("WebForm1.aspx?date=" + d) |
| End Sub |
When the user presses the browser back button I want the calendar to be "fresh" and not have the hidden selection.
Thanks.