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_Template
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
'Customize segment for decimal point
mySegments(0).value = -1 'The point has the value "-1"
mySegments(0).image = "Point.gif"
mySegments(0).imageDisabled = "Point.gif"
mySegments(0).imageActive = "PointActive.gif"
mySegments(0).imageDisabledActive = "PointActive.gif"
'Customize segments for digits
For i As Integer = 1 To mySegments.Count - 1
Dim Value As Integer = i - 1
Dim Image As String = "Num" & _
Value.ToString() & ".gif"
Dim ImageActive As String = "Num" & _
Value.ToString() & "Active.gif"
mySegments(i).value = Value
mySegments(i).image = Image
mySegments(i).imageDisabled = Image
mySegments(i).imageActive = ImageActive
mySegments(i).imageDisabledActive = ImageActive
Next i
End Sub
End Class
|