Hi
ltrlAvgRating.Text = Result.AvgRating.ToString();
plchStar.Controls.Add(new System.Web.UI.WebControls.Literal { Text = Utility.StarRating(5, Convert.ToDecimal(Result.AvgRating)) });
Thanks
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Deepak RawatPosted Jun 19, 2023, 11:00 AM
Ensure the
StarRatingmethod is implemented correctly and returns the expected output. Verify that it generates the HTML for the star rating based on the given rating value.Confirm that the
ltrlAvgRatingcontrol is correctly bound to theResult.AvgRatingvalue. Make sure thatResult.AvgRatinghas a valid value and is not null.Check if the
plchStarplaceholder control is correctly placed within the HTML markup and is present on the rendered page. Verify that it's not hidden or conditionally excluded from the page's display.Verify that there are no JavaScript errors or conflicts on the page that might prevent the star rating from being rendered properly.
Consider checking the generated HTML source code of the rendered page to see if the star rating HTML markup is present. You can use browser developer tools to inspect the rendered HTML and check if the generated star rating HTML is present and has the expected structure.
Prasad RaveendranPosted Jun 13, 2023, 2:38 AM
When I tried to execute the method, I have got the below string
I'm just wondering whether you have the proper CSS classes.
Ramco RamcoPosted Jun 12, 2023, 9:02 AM
Hi
Thanks
Prasad RaveendranPosted Jun 12, 2023, 1:50 AM
Make sure to review the code within the Utility.StarRating method and verify that it's generating the desired output correctly. Additionally, ensure that the plchStar control is correctly placed within the page's layout and that it's visible and properly rendered.
If you need further assistance, please provide more information about the Utility.StarRating method or any other relevant code snippets.