Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar's date-hyperlinks disappeared 1

Status
Not open for further replies.

ShikkurDude

Programmer
Mar 15, 2005
55
US
As soon as I set or even concatenate the text property of e.cell of the Calendar control, the dates of the calendar disappear. Those dates are the hyperlinks that fire the SelectionChanged event.

How can I change the text of each day (in DayRender) but still be able to detect SelectionChanged?

Thanks so much,
E.
 
Private Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender
e.Cell.Controls.Add(New LiteralControl("<br>Holiday"))


End Sub
 
rTomes - thanks very much! That will allow me to make clickable calendar "events". But aside from the items on the calendar being clickable with the LiteralControl, is it possible to detect when the day (cell) itself is being clicked?

Thanks,
E.
 
Private Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged
Response.Write(CType(sender, Calendar).SelectedDate)
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top