Calendar DayRender even in Asp.net

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:  http://www.codeproject.com/KB/aspnet/EventCalendar.aspx

My request is to translate these four lines of code into VB.net

Thanks

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

adamtraskAsked:
Who is Participating?
 
ddayx10Commented:
   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
0
 
adamtraskAuthor Commented:
Thank you so much ddayx10:



0
 
adamtraskAuthor Commented:
Thanks again
0
 
ddayx10Commented:
YW
0
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.