Error with Ajax.Beginform on ASP.NET MVC Page
- by Rupa
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.