AjaxRequest Error

2 posts, 0 answers
  1. gila
    gila avatar
    18 posts
    Member since:
    Sep 2010

    Posted 18 Jan 2011 Link to this post

    In my solution i have master page which contains :
    <telerik:RadScriptManager ID="MasterScriptManager" runat="server" EnablePageMethods="true">
    </telerik:RadScriptManager><telerik:RadAjaxManager ID="MasterAjaxManager" runat="server" />
    <telerik:RadWindowManager ID="MasterWindowManager" runat="server">....
    In one of my pages , on button client click i call a js function, showing radconfirm, after the user enter YES i get in other js function and call :
    "$find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("FINISH");"
    In the code behind of the page , on pageLoad i delegate the event of the ajaxrequest:
    "var manager = RadAjaxManager.GetCurrent(this);
    manager.AjaxRequest +=
    new RadAjaxControl.AjaxRequestDelegate(YourContentPage_AjaxRequest);"
    , and in the event i make swith case on the parameter i send:
    //Handle the Ajax event in your ContentPage code behind
    private void YourContentPage_AjaxRequest(object sender, AjaxRequestEventArgs e){
    //Optionally process supplied event arg
    switch (e.Argument)
    case "FINISH": //Do something
    btnFinish_Click(null, null);

    The problem is:
    first click on the button everything works - see the radconfirm, answer yes, get in the server event. but second click on the button happens: see the radconfirm, get in the function, doing the statement of the "find" above, i see that it isnot null, but hte somewhere it falls with this bug:
    "Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

    Needs urgent help,
  2. Mira
    Mira avatar
    1124 posts

    Posted 20 Jan 2011 Link to this post

    Hello Gila,

    I have followed your scenario and prepared a sample project for you demonstrating how the desired functionality can be implemented. You can find it attached to this message.

    Please take a look at it and let me know whether it helps.

    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top