B
Billy Jacobs
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(ByVal sender As
System.Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles
cldActivityDate.DayRender
Dim dr() As DataRow
Dim r As DataRow
Try
dr = CType(Session("dsLAStateData"),
dsLAStateData).Iteneraries.Select("EmployeeID=" & CType
(Session("UserInfo"), UserInfo).ID)
For Each r In dr
If r.Item("Activity Date") = e.Day.Date
Then
e.Cell.Controls.AddAt(1, New
LiteralControl("<font color=red>*</font>"))
'e.Cell.Controls.AddAt
(e.Cell.Controls.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
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(ByVal sender As
System.Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles
cldActivityDate.DayRender
Dim dr() As DataRow
Dim r As DataRow
Try
dr = CType(Session("dsLAStateData"),
dsLAStateData).Iteneraries.Select("EmployeeID=" & CType
(Session("UserInfo"), UserInfo).ID)
For Each r In dr
If r.Item("Activity Date") = e.Day.Date
Then
e.Cell.Controls.AddAt(1, New
LiteralControl("<font color=red>*</font>"))
'e.Cell.Controls.AddAt
(e.Cell.Controls.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