Error with Ajax.Beginform on ASP.NET MVC Page

Posted by Rupa on Stack Overflow See other posts from Stack Overflow or by Rupa
Published on 2010-03-09T01:00:20Z Indexed on 2010/03/09 1:06 UTC
Read the original article Hit count: 381

Filed under:
|

Hi

I am using Ajaxy Call to load the partial view. It is working fine in Firefox and IE without in Debug Mode. But in Debug mode, I am getting the follwoing error:

Error: 'Sys' is undefined

Ajaxy call Code:

 <% using (Ajax.BeginForm("SearchResults", new AjaxOptions { UpdateTargetId = "divLoadSearchResults" } ))
{%>

HTML View Source corresponding to this:

<form action="/Home/SearchResults" method="post" onclick="***Sys.***Mvc.AsyncForm.handleClick(this, new Sys.UI.DomEvent(event));" onsubmit="Sys.Mvc.AsyncForm.handleSubmit(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'divLoadSearchResults' });">

I am using MVC RC2 framework. Anyone have similar problems with RC2?

If it is not in Debug mode, it is working fine. Again, if i run it using Debug mode or CTRL+F5, it shows up the error.

Appreciate your responses.

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about asp.net-ajax