Dear All,
How to postback to a method, by retaning all the values entered in the present page with Image button.
Thanks,
Kaurn Kumar
Please find below is the code I have.
//This is the Controller method
public ActionResult owners_Registration_step2_33()
{
return View();
}
[HttpPost]
public ActionResult owners_Registration_step2_33(FormCollection collection)
{
string FirstName = collection["FirstName"];
return RedirectToAction("owners_Registration");
}
In the view I had a inputbutton and a image button like the below.
<input id="Submit1" type="submit" value=""/>
<a href="@Url.Action("owners_Registration_")" class="btnRegisterNow" title="Register Now">
</a>
From the above code I am able to postback to the method owners_Registration which declaerd as [HttpPost] and able to access the values from collection object. But it is not happening with the href.