c# - Disable button on a specific page -
i made web application in asp.net mvc5. in application have products. on every product logged user can press button. how can disable button after logged user pressed it. want other users able press button, not users have pressed button.
i don't want save in database users have liked product because have many values in database.
can give me advice how should this? @ least maybe save in session.
thanks!
just create simple db table called userlikes
it can have 2 columns: userid , productid
whenever user likes product, make entry in table. when user viewing product page, if see entry in table user , product, disable like
button.
Comments
Post a Comment