I have a simple MVC application that retrieves DB Server, database, username and password from the user to store in an XML file. I want to add a "Test Connection" button to the screen and have it execute a method on the controller called TestConnection. The problem is the TestConnection method resets all the information on the screen when clicked since the View is being returned with no model. (because a GET operation is occurring). Here is my code:From the Controller (named \[code\]FrameworkConfigurationController.cs\[/code\])\[code\] public ActionResult TestConnection() { return View("Index"); } [HttpPost] public ActionResult TestConnection(FrameworkConfigurationViewModel viewModel) { // TODO: Test will occur here viewModel.DbConnectionMessage = string.IsNullOrEmpty(viewModel.DatabaseName) ? "Connection unsuccessful" : "Connection successful"; return View("Index", viewModel); }\[/code\]From my View (\[code\]FrameworkConfiguration/Index\[/code\]):\[code\]@model Framework.ViewModels.FrameworkConfigurationViewModel@{ Layout = "~/Views/Shared/_Layout.cshtml"; }@using (Html.BeginForm()) {@Html.ValidationSummary(true)<fieldset> <legend>FrameworkConfigurationViewModel</legend> <div class="editor-label"> @Html.LabelFor(model => model.ServerName) </div> @* Edited for brevity *@ <button type="submit" onclick="location.href='http://stackoverflow.com/questions/14588420/@Url.Action("TestConnection")'"> Test Connection</button> @Html.ValueFor(model => model.DbConnectionMessage) <p> <input type="submit" value="http://stackoverflow.com/questions/14588420/Save" /> </p></fieldset>}<div> @Html.ActionLink("Back to Dashboard", "Index", "Home")</div>@section Scripts { @Scripts.Render("~/bundles/jqueryval")}\[/code\]Admittedly, I am new to MVC programming. I'm coming from a Silverlight/MVVM background so the concept is not foreign to me...the disconnected nature of web programming is. I've followed some tutorials out there, but none of them seem to cover this type of thing - every example is contrived. I know how to do this with webforms and code-behind, but I would like to accomplish this with MVC. Is there some way to "force" the POST operation instead of GET? I was under the impression that \[code\]<button type="submit">\[/code\]accomplished that. Perhaps the implementation of the onclick I have written isn't correct. I am sure this is HTML 101 stuff, but I can't seem to find a simple answer to this.Thanks for any help you can offer,Jason