Submitting form with partial view in ASP.NET MVC

Jak
Jak
Member
352 Points
151 Posts

Hi,

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

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

Share:   fb twitter linkedin
Answers
Brian
Brian
Participant
536 Points
73 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
banner

Blog

Active User (2)

 Log In to Chat