Submitting form with partial view in ASP.NET MVC

Jak
Jak
908 Points
132 Posts

Hi,

How to submit form with partial view in ASP.NET MVC?

Views: 9602
Total Answered: 1
Total Marked As Answer: 0
Posted On: 22-May-2015 09:06

Share:   fb twitter linkedin
Answers
Brian
Brian
2376 Points
13 Posts
         

Hi Jak,

Use Ajax.BeginForm as:

In Partial View:

 
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%using (Ajax.BeginForm("Index", "Account", new AjaxOptions { UpdateTargetId = "IndexID", HttpMethod = "Post" }))
{ %>
 
<input type="text" />
<input type="submit" value="submit" />
 
<%} %>
 

 

 

 

Posted On: 22-May-2015 09:49
 Log In to Chat