c# - How to ignore model binding from querystring in MVC -
i have form submission doing post back. controller action accepts values parameters. ex: editproduct(int productid, string productname).
productid supplied form in hidden field. how can ensure that user not invoke action , pass productid , name queystring , model binding bind vales , product saved in database?
you can sign product id secret key on server (using hmacsha512), verify signature in postback.
you might want include current date and/or user or session id when signing prevent replay attacks.
Comments
Post a Comment