This is a migrated thread and some comments may be shown as answers.

RadDataPager Routing, DialogHandler Problems

1 Answer 74 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 08 Jun 2012, 12:25 AM

Hi, I’m currently experiencing a problem with the RadDataPager and the Dialog handlers.

My application has a RadListView control with a RadDataPager in the layout. In the RadDataPager, I’m using the Routing functionality. In the Application_Start I have the relevant registration as documented in the forums here.

The problem is, when I register routes it breaks the handlers for the Telerik Dialogs in the RadEditor and other such controls. I will post the code that I think is the source of the problem and where the problem arises.

the aspx file has this section:
<Telerik:RadListView ID="RadListView1" runat="server"
        DataSourceID="SqlSource"
        ItemPlaceholderID="ItemContainer"
        AllowPaging="True"
        InsertItemPosition="FirstItem"
        ClientIDMode="Static">
    <LayoutTemplate>
        <asp:PlaceHolder ID="ItemContainer" runat="server" />
        <Telerik:RadButton ID="InsertButton" runat="server"
                CssClass="InsertButton"
                Text="New Announcement"
                ButtonType="LinkButton"
                CommandName="InitInsert"
                Skin="CustomRad"
                EnableEmbeddedSkins="False"
                EnableAjaxSkinRendering="False"
                Visible='<%# Not Container.IsItemInserted %>'>
                    <Icon PrimaryIconCssClass="rbAdd" PrimaryIconLeft="4" PrimaryIconTop="4" />
        </Telerik:RadButton>
 
        <Telerik:RadDataPager ID="RadDataPager1" runat="server"
                PagedControlID="RadListView1"
                PageSize="5"
                AllowSEOPaging="true"
                SEOPagingQueryPageKey="Page"
                    AllowRouting="true"
                    RouteName="AnouMain"
                    RoutePageIndexParameterName="Page">
            <Fields>
                <Telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                <Telerik:RadDataPagerButtonField FieldType="Numeric"
                        FirstButtonText="First"
                        LastButtonText="Last"
                        NextButtonText="Next"
                        PrevButtonText="Prev" />
                <Telerik:RadDataPagerButtonField FieldType="NextLast" />
            </Fields>
        </Telerik:RadDataPager>
    </LayoutTemplate>
         ... Templates omitted ...
</Telerik:RadListView>

the class i use for the registering of routes is:

Namespace SeoRouting
 
    ''' <summary>
    ''' Route Registering and other SEO Op functions and subs
    ''' </summary>
    ''' <remarks>TODO: Remarks to follow</remarks>
    Public Class Register
 
        Public Shared Sub Routes(ByVal Routes As System.Web.Routing.RouteCollection)
            Dim RouteValueDictionary As New System.Web.Routing.RouteValueDictionary()
            RouteValueDictionary.Add("Page", "1")
            Routes.MapPageRoute("AnouDefa", "en/Anou/{Page}", "~/en/Anou/Default.aspx", True, RouteValueDictionary)
            Routes.MapPageRoute("AnouMain", "announcements/Page{Page}", "~/en/Anou/Main.aspx", True, RouteValueDictionary)
        End Sub
 
    End Class
 
End Namespace

and the app start looks like this:

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        SeoRouting.Register.Routes(RouteTable.Routes)
End Sub

the web.config:

<httpHandlers>
    <!--<add verb="*" path="*.psd" type="System.Web.HttpForbiddenHandler" />-->
    <add path="ChartImage.axd"
         type="Telerik.Web.UI.ChartHttpHandler"
         verb="*" validate="false" />
    <add path="Telerik.Web.UI.SpellCheckHandler.axd"
         type="Telerik.Web.UI.SpellCheckHandler"
         verb="*" validate="false" />
    <add path="Telerik.Web.UI.DialogHandler.aspx"
         type="Telerik.Web.UI.DialogHandler"
         verb="*" validate="false" />
    <add path="Telerik.RadUploadProgressHandler.ashx"
         type="Telerik.Web.UI.RadUploadProgressHandler"
         verb="*" validate="false" />
    <add path="Telerik.Web.UI.WebResource.axd"
         type="Telerik.Web.UI.WebResource"
         verb="*" validate="false" />
</httpHandlers>
    <handlers>
        <remove name="ChartImage_axd" />
        <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
        <remove name="Telerik_Web_UI_DialogHandler_aspx" />
        <remove name="Telerik_RadUploadProgressHandler_ashx" />
        <remove name="Telerik_Web_UI_WebResource_axd" />
        <add name="ChartImage_axd" path="ChartImage.axd"
             type="Telerik.Web.UI.ChartHttpHandler"
             verb="*" preCondition="integratedMode" />
        <add name="Telerik_Web_UI_SpellCheckHandler_axd"
             path="Telerik.Web.UI.SpellCheckHandler.axd"
             type="Telerik.Web.UI.SpellCheckHandler"
             verb="*" preCondition="integratedMode" />
        <add name="Telerik_Web_UI_DialogHandler_aspx"
             path="Telerik.Web.UI.DialogHandler.aspx"
             type="Telerik.Web.UI.DialogHandler"
             verb="*" preCondition="integratedMode" />
        <add name="Telerik_RadUploadProgressHandler_ashx"
             path="Telerik.RadUploadProgressHandler.ashx"
             type="Telerik.Web.UI.RadUploadProgressHandler"
             verb="*" preCondition="integratedMode" />
        <add name="Telerik_Web_UI_WebResource_axd"
             path="Telerik.Web.UI.WebResource.axd"
             type="Telerik.Web.UI.WebResource" verb="*"
             preCondition="integratedMode" />
    </handlers>
</system.webServer>

so to be clear, when i have the routing on in the App_Start the dialogs don’t function throwing an error saying that the handlers are
missing from the Web.config I reviewed This Telerik Document for help but couldn’t see the solution.


Kind Regards.
M Mason.

===========
Q1 2012
Win7-64
ASP.NET 4.0 VB

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 13 Jun 2012, 01:15 PM
Hi Michael,

You can try replacing Telerik.Web.UI.DialogHandler.aspx with Telerik.Web.UI.DialogHandler.axd in the web.config file and set the RadDataPager's DialogHandlerUrl property to "~/Telerik.Web.UI.DialogHandler.axd".

Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
DataPager
Asked by
Michael
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or