Submitting form with partial view in ASP.NET MVC

Jak
Jak
Member
858 Points
132 Posts

Hi,

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

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

Share:   fb twitter linkedin
Answers
Brian
Brian
Moderator
2232 Points
14 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