AJAX Rating Control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saurabh9gupta
    New Member
    • Aug 2009
    • 52

    AJAX Rating Control

    Hello All,

    I need help regarding the rating control in AJAX. I want that a person when he visits my site,he is able to rate the content only once after login.

    I have developed the rating part but the person can rate multiple times.
    Can you help
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    Hello saurabh9gupta,

    This can be done in many ways. Here is one example on how you can do it seeing that you have an environment that is controlled by “login”.

    I assume that in the table where you store login information each record has a unique identifier (KeyID). An example of a recode could be:

    KeyID: 103
    LoginName: ‘CroCrew’
    Password: ‘xxxxxxxxx x’
    JoinDate: ‘10/28/2009 9:56:00 AM’
    LastLogin: ‘4/2/2010 7:01:00 AM’

    If you do have a unique identifier (KeyID) for each person that logs in then the table that you’re storing your rating in could trap who has voted and who still needs too. An example of a recode it that table could be:

    KeyID: 739
    QuestionerKeyID : 4
    MembersKeyID: 103
    Rating: 4

    Let me explain this table. I like to have a unique identifier for each record within all my tables and the “KeyID” field is that unique identifier. The next field is “QuestionerKeyI D” this is the unique identifier from another table that stores information on the question being asked. An example of a recode it that table could be:

    KeyID: 4
    Topic: ‘New look’
    QuestionBeingAs ked: ‘Please rate the content of our website.’
    Posted: ‘3/28/2010 4:65:00 PM’

    Now for the next field “MembersKe yID”. With the examples above you can see the relationship between the three tables and see that “CroCrew” has voted and gave the rating of “4” for the question “Please rate the content of our website.”

    Now the next time CroCrew reloads the page with the questioner on it check to see if he has voted and if he has just show the results.

    Again; this is just one of many ways to accomplish what you are trying to do. The nice thing about doing it this way is that you can add another “Questione r/Rating” in the future easily because you have the framework done.

    Hope this helps,
    CroCrew~

    Comment

    • saurabh9gupta
      New Member
      • Aug 2009
      • 52

      #3
      Thank you..
      but where can i find a tutorial for AJAX Rating Control

      Comment

      • CroCrew
        Recognized Expert Contributor
        • Jan 2008
        • 564

        #4
        Here ya go: http://www.asp.net/ajax/ajaxcontrolt...ng/Rating.aspx

        Happy Coding,
        CroCrew~

        Comment

        Working...