Posted on 2009-05-05
Is there a way to get a confirmation msg on the asp calender?
I need to set curtain dates from a table to show a warning before the user continues.
I have tried the following and it all works other than the onclick.
For i As Integer = 0 To tblInstallerClearDays.Rows.Count - 1
ClearDayDate = Convert.ToDateTime(tblInstallerClearDays.Rows(i)("ClearDayDate"))
If e.Day.Date = ClearDayDate Then
e.Cell.Font.Bold = True
e.Cell.ForeColor = Drawing.Color.Blue
e.Cell.Attributes.Add("onclick", "confirm('This day is set to be clear,\nare you sure you want to continue?')")