Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using ajax rating it's working fine but i couldn't execute the onchanged server method

the code snippet is follows

XML
<cc1:Rating ID="ItemRating" runat="server"
            CurrentRating="4"
            MaxRating="5"
            StarCssClass="ratingStar"
            WaitingStarCssClass="savedRatingStar"
            FilledStarCssClass="filledRatingStar"
            EmptyStarCssClass="emptyRatingStar"
            AutoPostBack="true"
            Tag="10"
            OnChanged="Rating_Changed" />



C#
protected void Rating_Changed(object sender, AjaxControlToolkit.RatingEventArgs e)
 {
     LblRating.Text = "Rated " + DRow[3].ToString() + " by " + DRow[4].ToString() + " People and your Rating is " + e.Value;
 }


help me what i need to change...
Posted
Updated 29-Apr-10 4:16am
v2

1 solution

hi,

Your code is just fine.May be somewhere else have the problem.Try this
On .aspx page in Page directive add AutoEventWireup="true"
and make sure you have add scriptmanager in the page.

Hope this will help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900