<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CallBack.aspx.cs" Inherits="Rating_CallBack" %>
<%@ Register TagPrefix="APNSoft" Namespace="APNSoft.WebControls" Assembly="APNSoftControls" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    
    
    <script type="text/javascript">

        function ResponseFromServer(ComponentID, SegmentID, SegmentValue, Parameter){
            
            //Get segment data
            var result = '';
            result += 'ComponentID: <b>' + ComponentID + '</b>';
            result += '<br/>SegmentID: <b>' + SegmentID + '</b>';
            result += '<br/>SegmentValue: <b>' + SegmentValue + '</b>';
            result += '<br/>Parameter: <b>' + cmn.DecodeValue(Parameter) + '</b>';
            result += '<br/>';
            
            //Display segment processed on the server side
            ShowEvent(result);
            
        };

        function ShowEvent(Event){
            try{
                var GrayBox=document.getElementById('GrayBox');
                GrayBox.innerHTML+='<br/>'+Event;
            }catch(ex){}
        };
        
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    <APNSoft:APNSoftRating id="myRating" runat="server"
        SkinFolder = "~/Rating/Skins/Classic/"
        SegmentsInTotal = "16"
        AutoCallBackOnSegmentClick = "True"
        ClientSideAfterCallBack = "ResponseFromServer('$ComponentID$', '$SegmentID$', $SegmentValue$, '$Parameter$');"
    />

    <div class="GrayBox" style="left:300px;top:30px;width:350px;">
        <div><b>Event log:</b></div>
        <div id="GrayBox"></div>
    </div>




    </div>
    </form>
</body>
</html>