Answer the question
In order to leave comments, you need to log in
How to send a Post request when clicking on an image in ASP.NET 5?
Good afternoon.
I am coding the View in ASP.NET 5.
The task is simple: there are two pictures (each has its own id), and one additional identifier. When clicking on an image, you need to send a POST request with the image id and an additional identifier. I can imagine how to implement this using html forms, but the solution is very crooked. Are there more beautiful options?
Answer the question
In order to leave comments, you need to log in
Crooked or not - make a form with two hidden-fields, and hang a script on the picture. In the Script, put the necessary identifiers on the hidden-fields and make the form submit
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question