calendar control - i assume a tooltip but not sure how to do it.

i would like to add a calendar to my website that when I hover over a date it reads the data from my sql server for that date.

For example I have managers on call different days of the weeks. if I hover over the date I want it to show who is on call.

a working example would be wonderful...  Thanks!
bbimisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bbimisAuthor Commented:
I thought something along these lines but can't get it to work:
Imports System.Data.SqlClient

Partial Class main
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load

        Dim ConnectionString As String = System.Web.Configuration.WebConfigurationManager.ConnectionStrings("dbconn").ToString()
        Dim Id As String = "1"

        Dim MyConn As New System.Data.SqlClient.SqlConnection(ConnectionString)
        Dim MyComm As New System.Data.SqlClient.SqlCommand("SELECT * FROM [dbo].[Table] WHERE id = " + Id, MyConn)

        MyConn.Open()
        Dim DataReader As System.Data.SqlClient.SqlDataReader = MyComm.ExecuteReader()

        While (DataReader.Read())




        End While

        DataReader.Close()
        MyConn.Close()


    End Sub


    Protected Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs)
        Dim ConnectionString As String = System.Web.Configuration.WebConfigurationManager.ConnectionStrings("dbconn").ToString()



        Dim MyConn As New System.Data.SqlClient.SqlConnection(ConnectionString)
        Dim MyComm As New System.Data.SqlClient.SqlCommand("SELECT * FROM [dbo].[docs] WHERE date = " + Calendar1.SelectedDate, MyConn)

        MyConn.Open()
        Dim DataReader As System.Data.SqlClient.SqlDataReader = MyComm.ExecuteReader()

        While (DataReader.Read())
            Calendar1.ToolTip = "the date is" + Calendar1.SelectedDate

            

        End While

        DataReader.Close()
        MyConn.Close()






    End Sub

End Class

Open in new window

then in the aspx take and call the following:
<asp:Calendar ID="Calendar1" runat="server" OnDayRender="Calendar1_DayRender"  ></asp:Calendar>
0
Bob LearnedCommented:
For custom day tool tips, you can set them in the DayRender event handler, by accessing the e.Cell.ToolTip property.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bbimisAuthor Commented:
thanks that worked.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

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.