Hi Grzesiek23,
Grzesiek23:I want to start up the code after user's rating. Now I'm getting redirect to old url + "#".
Your description is not clear enough.Based on my experience, I assume that you want to get the return words on client when Changed event is fired or you want to operate on server side. Here is the a sample. Please wholly copy my sample to your project and have a test. For more usages, you can find two pretty sample inside the AJAX Control Toolkit source code.
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Rating1_Changed(object sender, RatingEventArgs e)
{
e.CallbackResult = "Hello, world!";
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.ratingStar {
font-size: 0pt;
width: 13px;
height: 12px;
margin: 0px;
padding: 0px;
cursor: pointer;
display: block;
background-repeat: no-repeat;
}
.filledRatingStar {
background-image: url(../pic/FilledStar.png);
}
.emptyRatingStar {
background-image: url(../pic/EmptyStar.png);
}
.savedRatingStar {
background-image: url(../pic/SavedStar.png);
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<ajaxToolkit:Rating ID="Rating1" BehaviorID="RatingBehavior1" runat="server" CurrentRating="5"
MaxRating="10" StarCssClass="ratingStar" WaitingStarCssClass="savedRatingStar"
FilledStarCssClass="filledRatingStar" EmptyStarCssClass="emptyRatingStar" Tag="99"
OnChanged="Rating1_Changed" >
</ajaxToolkit:Rating>
<script type="text/javascript" language="javascript">
function pageLoad(){
$find("RatingBehavior1").add_EndClientCallback(onEndClientCallBack);
}
function onEndClientCallBack(sender, eventArgs){
alert(eventArgs.get_CallbackResult())
}
</script>
</form>
</body>
</html>If I have misunderstood you, please feel free to let me know.
Best regards,
Jonathan