Pass Textbox Value From View To Buttons February 19, 2023 Post a Comment View: @using (@Html.BeginForm('Show', 'test', FormMethod.Post)) { Solution 1: Try this, <input type="button" value="Show" onclick = "location.href='@Url.Action("Show", "Foo")'"/> <input type="button" value="Go" onclick = "location.href='@Url.Action("Go", "Foo")'"/> Copy UPDATE: As type="button" does not submit the values in the form, its not directly possible to do what you have asked, the better idea is to Identify the Button that has been clicked in the controller method as show in this link Solution 2: Try thisBaca JugaMvc 4 Razor Adding Input Type DateHow To Create Anchor Href Using Html.helperIn My Mvc 5 Project, I Can't Access Static Html Page When Working On Local Iis <input type="button" value="Show" onclick="location.href='<%: Url.Action("Show", "Controller") %>'" /> <input type="button" value="Go" onclick="location.href='<%: Url.Action("Go", "Controller") %>'" /> Copy Solution 3: Try something like: <input type="button" value="Show" onclick="location.href='<%:Url.Action("Show", "ControllerName")%>'"/> <input type="button" value="Go" onclick="location.href='<%:Url.Action("Go", "ControllerName")%>'"/> Copy If you are posting more form data you can use Ajax, see Making a Simple Ajax call to controller in asp.net mvc Share You may like these postsAdd Dropdown Box In Google SiteChanging Color Of Jquery Ui ButtonsButtons Centered Over CanvasArrows To Switch The Month In A Calendar App Post a Comment for "Pass Textbox Value From View To Buttons"