Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Ajax.BeginForm and UpdateTargetId not working

$
0
0

Hello there,

I'm trying out Ajax on MVC 4.5. The following code:

div id="comments"><ul>
@foreach(var comment in Model)
{<li>@comment.Content</li>
}</ul>
@using (Ajax.BeginForm("_Submit", "Comment", new AjaxOptions() { UpdateTargetId = "comments" })) {
@Html.AntiForgeryToken()
@Html.Action("_CommentForm", new { CourseID = ViewBag.CourseID })
}</div>

keeps redirecting me to the partialview instead of just updating the div with the id "comments".
Can someone point me out where to start troubleshooting? Maybe scritpts/bundles to include, global options or such.

Thanks in advance

Filipe




Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>