Problem with Calander Control Day Render Event

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Billy Jacobs

    #1

    Problem with Calander Control Day Render Event

    I am using the Day Render Event to place a red * on each
    day where there is at least one event. This works fine on
    my local machine. It however does not work on the
    production server. The following is my code:

    I even tried it removing the if completely. Just writing
    the literal control to every cell no matter what and that
    did not work on the production server either.

    Please help. P.S. I know I have uploaded the code
    correctly because other changes I have made appear
    correctly.

    Here is my code.

    Private Sub cldActivityDate _DayRender(ByVa l sender As
    System.Object, ByVal e As
    System.Web.UI.W ebControls.DayR enderEventArgs) Handles
    cldActivityDate .DayRender
    Dim dr() As DataRow
    Dim r As DataRow
    Try
    dr = CType(Session(" dsLAStateData") ,
    dsLAStateData). Iteneraries.Sel ect("EmployeeID =" & CType
    (Session("UserI nfo"), UserInfo).ID)
    For Each r In dr
    If r.Item("Activit y Date") = e.Day.Date
    Then

    e.Cell.Controls .AddAt(1, New
    LiteralControl( "<font color=red>*</font>"))
    'e.Cell.Control s.AddAt
    (e.Cell.Control s.Count - 1, New LiteralControl( "<font
    color=red>*</font>"))
    Exit Sub
    End If
    Next
    Catch ex As Exception
    lblError.Text = ex.Message & " in
    cldActivityDate _DayRender"
    End Try
    End Sub
Working...