Calendar DayRender even in

Hello experts,

I am trying to understand the Calendar DayRender event and the many uses we can apply it to. In my search on the internet I came across the following code which is in C# and I couldn't understand both the first and last lines of that shot code which can be found at the following address:

My request is to translate these four lines of code into


CalendarDay d = ((DayRenderEventArgs)e).Day; 
        TableCell c = ((DayRenderEventArgs)e).Cell;    
        if ( !d.IsOtherMonth )    
            c.Controls.Add(new LiteralControl(dr["EventDetails"].ToString()));

Open in new window

Who is Participating?
   Protected Sub Cal_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Cal.DayRender
        'CalendarDay d = ((DayRenderEventArgs)e).Day;
        'TableCell c = ((DayRenderEventArgs)e).Cell;    

        'If (!d.IsOtherMonth) Then
        '    c.Controls.Add(new LiteralControl(dr["EventDetails"].ToString()));

        Dim d As CalendarDay = e.Day
        Dim c As TableCell = e.Cell

        If Not d.IsOtherMonth Then
            c.Controls.Add(New LiteralControl(datareaderyoudidntinclude("EventDetails"))
        End If
    End Sub
adamtraskAuthor Commented:
Thank you so much ddayx10:

adamtraskAuthor Commented:
Thanks again
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.