.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to implement user rating using ajax rating control from database?

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
Hi,I'm beginner to ajax. I've a database table having fields rating and item id.I've to display star rating using  ajax rating control for the corresponding item id.How can i do this?  

View Complete Post

More Related Resource Links

AJAX rating control on DataRepeater problem



 I am using a DataRepeater control to display records from a database. I have placed an AJAX rating control in the repeater. The control works fine for the first record in the data repeater but it does not work for the rest of the records. The problem is that the control renders fine on the screen but I cannot click it - the mouse changes when hovering over it, but the control does nothing, not even when I click it. The first item works ok though. Any ideas what could be the problem?

 Thanks a lot

Difference between Rating and RatingExtender control in ajax control toolkit

Hi, Can you tell the difference between Rating and RatingExtender asp.net ajax Control ? 

AJAX Control Toolkit - Rating Issue



I have implented the AJAX Control Toolkit and added the Rating Control to my page. It displays exactly as it should and even performs postback correctly, however it refuses to do anything on mouseover. The stars just continue to display whatever I set as the 'Current Rating'.

Here is the code I'm using; I believe I've correctly stripped out anything that's irrelevant:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>


<style type="text/css"> /* Rating */ .ratingStar { font-size: 0pt; width: 13px; height: 12px; margin: 0px; padding: 0px; cursor: pointer; display: block; background-repeat: no-repeat; } .filledRatingStar { background-image: url(Images/FilledStar.png); } .emptyRatingStar { background-image: url(Images/EmptyStar.png); } .savedRatingStar { background-image: url(Images/SavedStar.png); } </style>
<form id="form1" runat="server&q

JS for Rating Ajax Control



I saw this video from Joe Stagner (Thanks !).

I try to do the same, but we don't have the JavaScript to test the rollover on the star and the update of the label when we click on the button.

What JavaScript use ? Where ?

I have another problem, I would use this rating control in a user control. But for the moment, i have this error :

"Impossible d'annuler l'inscription de UpdatePanel avec l'ID 'UP1', car il n'était pas inscrit auprès de ScriptManager. Cela peut se produire si UpdatePanel a été supprimé de l'arborescence du contrôle et rajouté ensuite, ce qui n'est pas pris en charge.
Nom du paramètre : updatePanel"

In English : "Impossible to cancel the inscription of UpdatePanel with id 'UP1', because he wasn't register on ScriptManager. This can produce if UpdatePanel was deleted from the architecture of the control and add one more after, what is not functionnel.

Name of the parameter : updatePanel"

If you have solutions for me,

i'll be waiting.

Thanks a lot for your answer.

Advanced Basics: Creating a Five-Star Rating Control


I have to admit it; most of my Windows® Forms controls are an attempt to copy something that already exists. In my October 2004 column I showed you how to create a progress bar that mimicked the one shown during the Windows XP setup routine, and this month I'm at it again.

Duncan Mackenzie

MSDN Magazine January 2005

jQuery Rating Control in Repeater - Not Duplicating per Record

Hi Everyone,There is a similar instance of this @ http://forums.asp.net/p/1380776/2919093.aspx#2919093 However I haven't had a response, maybe due to the age of the topic, but the problem is different in the sense I am not using AJAX Rating Control, I am using radio buttons contained in a Div named Ratings, which is picked up by jQuery to style to radio buttons accordingly. The output is that it will put the stars on the first record but anything after just shows origional unstyled radio buttons. Just thinking off the top of my head, but does anything need to be put in the ItemDataBound event? The jQuery for the stars etc were attained from the link below:http://orkans-tmp.22web.net/star_rating/index.html#demos=&main-menu=0&demo-tabs=3 Here is my code:.ASPX:<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Admin_Test" Title="Untitled Page" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="CPCHeader" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="AdminCPC" Runat="Server"> <asp:R

weird Rating Control behavior

Hi folks! :)I have Rating control on my page. The page is a subpage of nested master page. On that page is updatepanel and wizard with TemplatedWizardStep inside it and inside TemplatedWizardStep is Rating Control.Master.Page -> NestedMaster.Page -> Content.PageI allso have googlemap inside that wizard(on different step) so i need to register google initialize() for it to work.So by registering googlemap like example below Rating Control freezes. Private Sub ScriptManager1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles ScriptManager1.Load ScriptManager.RegisterStartupScript(Page, Page.GetType(), "onload", "initialize()", True) End Sub But if i include script tags in string like example below, Rating Control does not freeze. Private Sub ScriptManager1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles ScriptManager1.Load ScriptManager.RegisterStartupScript(Page, Page.GetType(), "onload", "<script>initialize()</script>", False) End Sub Everythnig works, but i wonder, WHY :) Why is Rating Control freezing in sample1?

Ajax enabled user control

Hello all, I've just started to play around with MVC 2. The purpose of it is to evaluate the effort for our team to switch from ASP.net Forms to MVC. The start was quite simple. At the moment the MVC pattern and its implementation (conventions, etc.) is understood it seems to be simpler to get an application running in MVC then in Forms.   In one of our upcoming projects we have to build an Ajax enabled UI. We already work with the jQuery so it will be the library of our choice. The controls we have to build are more or less complex and most of them are based on a domain entity for which we have a class in our domain model.   Now I am wondering what might be the best way to build our ajax enabled user controls.   I have read a few tutorials and blogs about two potential options:   1. Extension methods for HtmlHelper 2. Partial views and Html.RenderPartial   Option 1 is interesting because we pass typed parameters to a method and the output is a HTML string.   Option 2 is interesting because we have way more possibilities to hook into behaviours of control / page rendering.   It would be interesting for me if you could share best practices.   Thanks in advance   nofxmojo

AJAX tabcontainer, User Control and Sharepoint UserProfile

Hi All, I am working on following requirement. There is AJAX control, tabcontainer which is added in a user control which inturn is loaded in a sharepoint web part. Controls added int the tabcontainer include textboxes, a drop downbox and a button.On Page load I am connecting to sharepoint logged in user profile and display the information in the tabcontainer. I have kept provision to change the values for some fields which the user can change. On click of submit button the data should get saved to the same user profile and the tabcontainer should get refreshed with the new values entered. Problem Faced: On Page load all the values get populated to the controls placed in tabcontainer. But when I do any change in the control and click on submit, the changed values are not getting displayed instead old values are retained. Please help me in handling postback event. Following is the piece of code on page load and submit button protected void Page_Load(object sender, EventArgs e)         {             using (SPSite ospSite = new SPSite("http://omistestsrv:1995"))             {                 try           

Displaying the Rating (Star) Scale Control for a list item.

Is there anyway to display the star rating control? I'm trying to build an application page that displays list items and their associated rating control. I can count the amount of ratings using the SocialRatingManager...?




"AjaxControlToolkit.RatingExtender missing required StarCssClass property value for Rating1_RatingExtender.
Parameter name: StarCssClass"






Ajax, Smart Parts(web part w/ ajax support), User Control, and a GridView


So I am playing around with a user control that I created that adds some functionality to a SPList. I have scoured the web looking for a way to get a web part that had a gridview with custom buttons that is bound to certain Items in a sharepoint list. I found Smart Parts and created an Ajax enabled User Control. the problem is that the label is updating but the gridview is not. and on a site note how can I format the Time on Board column to not include milliseconds(the fields are showing up like '1.02:48:31.8633636') i just want 1.02:48 and maybe the 31:

here is my ascx:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AlertControlWebPart.ascx.cs"
  Inherits="AlertControlWebPart.AlertControlWebPart, AlertControlWebPart, Version=, Culture=neutral, PublicKeyToke

how to fill user control(.ascx) (Dropdown from Database)


i am created a user control(.ascx)

<span><asp:DropDownList ID="Drop_DocType" runat="server"  DataTextField="DOCTYPE"DataValueField="DOCTYPE"/></span>

  how to fill it rom database and where i put soure code

how to create dropdownlist user control(acsx) and fill from database


how to create dropdownlist user control(acsx) and fill from database

SharePoint 2010- Custom Fields Like Rating Control- Need Suggestion on Saving Data


Hi All,

I am in process of Developing a Custom Field for Rating control. Requirements are below.

1) This field will be used for Creating survey

2) It will be called Rating control with Attribute ( some enhancement over out of box rating control)

3) Respondent will rate each attribute for 1 question like

                Action: 3

                Comedy: 5

                Thriller: 7

I need suggestion on  How to save data for above Requirements. I have designed control and it works fine. Only thing I need help on How to and Where to Save data related to answer?


Thanks in Advance



Pathik Rawal Blog: http://pathikhrawal.wordpress.com

Display rating control in xslt list view webpart without table header



In the same code, pasted above if I want to display rating control using xslt list view webpart what I need to write.

I have created few xslt list view webparts for my site but I am not able to display rating control using xslt. I am writing something like this

<xsl:apply-templates select="$Fields[@Name='AverageRating']" mode="PrintField">
              <xsl:with-param name="thisNode" select="."/>
              <xsl:with-param name="Position" select="$Position"/>

But for this I think i need to include some parameter or any particular template. Using the above type of code in xslt this is not working. I do not want to display table header row. Please guide me on this.


Database structure for Rating articles


I'm trying to construct a article page, where people can rate the article. Currently, I have a table Articles, that stores the articleId, articleContent, and few other information. And a Rating table where I store userid, articleid and rating.


articleId, articleContent


userId, articleId, rating

My worry is, there can be several users rating, several articles. The Rating table is growing exponentially. There are NxM entries in my rating table for N users and M articles.

Is there a better way to design my database, so I won't run into a huge Rating table, and help reduce the time the below query takes to run.

select sum(rating)/count(*) where articleId = 'x' -- to calculate the average rating for a give article

Thanks in Advance!!!

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend