Hello Tina.
I'd suggest using a HTMLGenericControl rather than a literal.
This is a c# version i use, it may help:
//the function to render the days of the calendar as specified by us
private void Calendar1_DayRender(object sender,
System.Web.UI.WebControls.DayRenderEventArgs e)
{
//clear the controls that are rendered automatically
//by the calendar control
e.Cell.Controls.Clear();
//Create a new link control
System.Web.UI.HtmlControls.HtmlGenericControl Link = new
System.Web.UI.HtmlControls.HtmlGenericControl();
Link.TagName = "a";
Link.InnerText = e.Day.DayNumberText;
//set the href value to the javascript function to select the date
Link.Attributes.Add("href", "javascript
:SelectDate('" +
e.Day.Date.ToString("d") + "');");
//set the color of the link
Link.Attributes.Add("style", "color:#000000;");
//add our link control to the day
e.Cell.Controls.Add(Link);
}
"Tina" wrote:
This does not work...
Private Sub calWO_DayRender(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles calWO.DayRender
If e.Day.Date.Day = 18 Then
Dim myControl As New LiteralControl("<a
href='http://www.google.com'></a>")
e.Cell.Controls.Add(myControl)
End If
End Sub
Anyone know why not?
Thanks,
T