View Single Post
  #1 (permalink)  
Old December 17th, 2010, 03:49 PM
lagonave lagonave is offline
Registered User
Join Date: Dec 2010
Posts: 8
Thanks: 6
Thanked 2 Times in 2 Posts
Default Calling the "Regsiter" action method using AJAX (page 122)

Hello all,
For some reason, this piece of code does not work at least with me. Here is the code..
<%:Ajax.ActionLink("RSVP for this event", "Register","RSVP", new { id=Model.DinnerID }, new AjaxOptions { UpdateTargetId="rsvpmsg"})%>

Here is the error that I got: Microsoft JScript runtime error: 'Sys' is undefined.

and the dynamic code shown is ": <a href="/RSVP/Register/9" onclick="Sys.Mvc.AsyncHyperlink.handleClick(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'rsvpmsg' });">RSVP for this event</a>

Do you guys have any idea why this mess happen?