Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls

Imports APNSoft.WebControls

Partial Public Class Rating_Segments
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        'Create the collection of Segments
        myRating.DataBind()
        Dim mySegments As RatingSegmentCollection = myRating.Segments

        'Configure segments
        For i As Integer = 0 To mySegments.Count - 1
            'Set new ID
            mySegments(i).id = "s" & _
            (i + 1).ToString()

            'Set new value
            mySegments(i).value = (i + 1) * 10

            'Set tooltip (title)
            mySegments(i).title = "ID:" & _
            mySegments(i).id & "  value:" & _
            mySegments(i).value.ToString() & "  index:" & _
            i.ToString()
        Next i

    End Sub
End Class