Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Post button actions back to same controller?

$
0
0

I have a HomeController, which invokes a view (Index.cshtml). In a form in this view, I have two simple buttons: like this:

<formmethod="post">

   <buttontype="submit">AUTO</button>   

   <buttontype="submit">OUT</button>

</form>

What is the correct method to wire these up to invoke two different methods (Auto and Out) in the Homecontroller?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>