Ajax paging does not work

Sep 28, 2011 at 3:45 PM

Here is my view:

The control isn't using Ajax to fill the div but rather URL paging and breaking the site. I have all the correct ajax dlls as using jquery 1.6.3 and jquery ui 1.8.16

What would be the problem???

<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl(Of PagedList(Of ClarifirePortal.PortalAnnouncement))" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc"  %>

<script type="text/javascript" >

    function gotoSearch() {

        window.location.href = '<%:URL.Action("Search","Home") %>';
    }

    function openDIV(divID) {

       var ele = document.getElementById(divID);

        if (ele.style.display == "block") {
            ele.style.display = "none";
          }
        else {
            ele.style.display = "block";
        }       
    }

</script>

<br />
<div id="divPortal">
<%If Model IsNot Nothing AndAlso Model.Count > 0 Then%>
    <br />
    <% Using Html.BeginForm("Search", "Home", FormMethod.Post, New With {.id = "PortalForm"})%>
        <table width="98%">
            <tr>
                <td>
                    <%: ViewData("WebStatus")%><br /><br />
                </td>
            </tr>           
            <tr>
                <td>
                    <% If ViewData("Enabled") = False Then%>
                        <input type="submit" value="Continue" class="t-button" name="Continue" onclick="gotoSearch(); return false;" />
                    <% End If%>
                </td>
            </tr>       
            <tr>
                <td>
                    <br />
                    <br />
                        <table width="100%" style="border: 2px solid #4675bb;">
                            <tr>
                                <td>
                                    Announcements
                                </td>
                            </tr>
                            <% For Each oAnnouncement As ClarifirePortal.PortalAnnouncement In Model%>
                            <tr>
                                <td align="left" style="width: 500px;"> <a href='void();' onclick='openDIV(<%:oAnnouncement.contentID %>); return false;' class="eMasonLink">
                                    <%: oAnnouncement.DatePosted & "-" & oAnnouncement.Title%></a><br />
                                    <%: oAnnouncement.ShortDescription%>
                                </td>
                            </tr>                             
                            <%Next%>               
                            <tr>
                                <td colspan="1">
                                    <%:Html.AjaxPager(Model, "LoadStatus", "Home", New PagerOptions() With {.PageIndexParameterName = "portalPage", .ShowDisabledPagerItems = False, .AlwaysShowFirstLastPageNumber = True}, New AjaxOptions With {.UpdateTargetId = "divPortal"})%>
                                </td>
                            </tr>
                        </table>
                </td>       
            </tr>        
         </table>                 
    <%End Using%>
<%Else %> 
    <br />
    <% Using Html.BeginForm()%>
    ...
    <%End Using%>
<%End If%>
</div>