i am reading the professional asp.net mvc book an开发者_如何学Cd implement the nerd Dinner example and when start to use Ajax :
<%: Ajax.ActionLink( "RSVP for this event",
"Register", "RSVP",
new { id=Model.DinnerID },
new AjaxOptions { UpdateTargetId="rsvpmsg" }) %>
<% } %>
all right, but when click on "RSVP for this event" link the IE display error message :
"Sys is undefined"
and when click debug it refer to the line :
<a href="/RSVP/Register/4" onclick="Sys.Mvc.AsyncHyperlink.handleClick(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'rsvpmsg' });">RSVP for this event</a>
i know that "Sys" should be "System" but how to fix that .
thnks
The error messages are correct. You need to make sure you're including the correct javascript files in your view:
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
精彩评论