harrison.chow 0 Newbie Poster

Hi All,

I have displayed three values(numbers) in some of the days of the month using the calendar control. I would like to make each link clickable and when it is clicked, it would display more details on the value that the user has clicked on the same page. So my problem is that i could not wire up the call to the function that it corresponds to... could anyone help?

I have tried creating LinkButton dynamically, but it did not. I was going to try the javascript:_dopostback but i don't really understand how to do it...

any help would be greatly appreciated!

Harrison

here is the code that i have so far:

Protected Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As DayRenderEventArgs)
        Dim d As CalendarDay = e.Day
        Dim c As TableCell = e.Cell
        If d.IsOtherMonth Then
            c.Controls.Clear()
        Else
            Try
                ' using arrays that were saved in FillClaimCounts
                Dim day As Integer = d.Date.Day
                Dim month As Integer = d.Date.Month
                Dim year As Integer = d.Date.Year
                Dim total As Integer = ttl(day - 1)
                Dim completed As Integer = cmp(day - 1)
                Dim remain As Integer = remn(day - 1)

                If total <> 0 Then
                    Dim a As LinkButton = New LinkButton
                    a.Text = total
                    a.Attributes.Add("href", "#")
                    'a.Attributes.Add("href", "javascript:__doPostBack('" + a.ID + "','')")
                    AddHandler a.Click, AddressOf foo
                    c.Controls.Add(a)
                End If
            Catch ex As Exception
                Response.Write(ex.ToString())
            End Try
        End If
    End Sub

    Protected Sub foo(ByVal sender As Object, ByVal e As EventArgs)
        Dim s = ""
    End Sub