WebGrid rendered but AJAX malfunction

I'm developing an MVC 4 App with Razor v2. But when trying to employ WebGrid helper with ajax, I found that the WebGrid table is rendered without the function of ajax.Here is the example code:\[code\]@Code Dim grid = New WebGrid(source:={"A", "B", "C", "D"}.Select(Function(x) New With {.ID = x, .ID2 = x & "2"}), defaultSort:="ID", rowsPerPage:=2, canPage:=True, canSort:=True, ajaxUpdateContainerId:="con")End Code<div id="con"> @grid.GetHtml()</div>\[/code\]I've set the param "ajaxUpdateContainerId" and contain the table in an identified div. But when the page is rendered in Page Inspector, it has NO ajax function at all. I've checked the HTML Source and it contains NO "onclick" event handler as it should. Moreover, the "href" attributes of the paging links are like "Test?page=2" rather than "#". It seems that the ajax functions are totally disabled.How can I fix it? Thank you vey much.
 
Back
Top