Below is basically the code direct from "SAMS ASP.NET unleashed". Without
the AutoPostBack="True" i get dump to a page cannot be displayed witht
"javascript:__doPostBack('calCalendar','V2588')" in the address field. With
the AutoPostBack statement nothing happens when you click on a date. Where
am i going wrong?
Thanks in advance for your help.
<Script Runat="server">
Sub Calendar_SelectionChange(s as Object, e as EventArgs)
Dim dtmDate As DateTime
lblDates.Text = "<h2>You selected the following date(s):</h2>"
For Each dtmDate in calCalendar.SelectedDates
lblDates.Text &= "<li>" & dtmDate.ToString( "D" )
Next
End Sub
......
<asp:calendar
ID="calCalendar"
SelectionMode="DayWeekMonth"
SelectWeekText="Week"
SelectMonthText="Month"
AutoPostBack="True"
OnSelectionChanged="Calendar_SelectionChange"
runat="server"/>
<asp:Label
ID="lblDates"
Runat="Server" />
|