using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using APNSoft.WebControls;

public partial class Rating_PostBack : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //Apply the event-handling method
        myRating.OnSegmentClick += new APNSoft.WebControls.RatingEventHandler(myRating_OnSegmentClick);
    }


    //The event-handling method
    void myRating_OnSegmentClick(object sender, APNSoft.WebControls.RatingEventArgs e)
    {
        //Get component instance
        APNSoftRating myRating = (APNSoftRating)sender;

        //Get clicked Segment
        RatingSegment mySegment = e.RatingSegment;

        //Display clicked Segment data
        string ClickedSegment = "";
        ClickedSegment += "Component ID: <b>" + myRating.ID + "</b>";
        ClickedSegment += "<br/>Segment ID: <b>" + mySegment.id + "</b>";
        ClickedSegment += "<br/>Segment value: <b>" + mySegment.value + "</b>";
        lblClickedSegment.Text = ClickedSegment + "<br/><br/>";
    }
}