Hello,
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);
break;
}
}
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,
thanks,
gz
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);
break;
}
}
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,
thanks,
gz