ASP.NET c# Rating control - making it one time rating and fixed -


i'm trying follow example allow users rate seminars have attended:

http://www.aspsnippets.com/articles/using-aspnet-ajax-rating-control-inside-gridview-templatefield-itemtemplate.aspx

how can make rating rated user once , display ratings rated user? dont want let users change own rating multiple times.

thanks!

on fruit_rating table have add userid.

fruitid | rating | userid 

and before inserting rating, have make query see if userid made rating on fruit, if it's true skip, else make insert.

pseudo cod below.

var currentrating = getfruit_ratingby(ratingid , userid); if(currentrating == null) {      currentrating = new fruit_rating(fruitid, newrating, userid);      insert(currentrating); } 

if want cell readonly can override rowdatabound event , write logic readonly there.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -