Hi i am new to web development. I know on post and get method whereby when someone browse for a hyperlink it goes to the get message whereas when someone submit a form or anything it goes to the post method to process the information. I have a simple application as below
[HttpGet]
public ViewResult RsvpForm()
{
return View();
}
[HttpPost]
public ViewResult RsvpForm(GuestResponse guestResponse)
{
return View();
}
The problem i facing was when click submit button without the post method which i removed it from the coding it refresh and clear the field in the form. With the post it did not clear the value in the form. Can i know why such behavior?