O
O
Oxoron2016-02-25 22:34:16
ASP.NET
Oxoron, 2016-02-25 22:34:16

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

1 answer(s)
D
Dmitry Kovalsky, 2016-02-26
@Oxoron

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 question

Ask a Question

731 491 924 answers to any question