Submitting form with partial view in ASP.NET MVC

Jak
Jak
Member
364 Points
152 Posts

Hi,

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

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

Share:   fb twitter linkedin
Answers
Brian
Brian
Participant
570 Points
75 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