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

[Solved] Crash on submitting

4 Answers 145 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Sergey asked on 03 Jun 2008, 10:04 AM
Strong reprodusing of crash during submiting data
If I removing RadAjaxManager - everything goes ok. when it using  - application crashing.

RadControls for ASPNET AJAX Q1 2008


           <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="rgEditGrid">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="rgEditGrid" />
                            <telerik:AjaxUpdatedControl ControlID="phError" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>

<

telerik:RadGrid ID="rgEditGrid" ........ </telerik:RadGrid>

<

asp:PlaceHolder ID="phError" runat="server"></asp:PlaceHolder>


Error description:
 

Server Error in '/' Application.

Value cannot be null.
Parameter name: key

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: key

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentNullException: Value cannot be null.
Parameter name: key]
   System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) +41
   System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +2667593
   System.Collections.Generic.Dictionary`2.ContainsKey(TKey key) +4
   Telerik.Web.UI.RadAjaxControl.CreateUpdatePanel(Control initiator, String eventName, Control updated) +582
   Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e) +1478
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnPreRender(EventArgs e) +2117788
   System.Web.UI.Control.PreRenderRecursiveInternal() +86
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 03 Jun 2008, 11:01 AM
Hello Sergey,

Placeholders do not render any html to the page and therefore the AjaxManager cannot find such control for update. You can use asp:Panel, div or any other container control that renders something to the html output.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Sergey
Top achievements
Rank 1
answered on 03 Jun 2008, 01:42 PM
I see

Is it possible to do more correct error handing at Telerik side? At least more details in error description to allow developer understood reason of error and fix it without need to ask telerik support (for example - RadAjaxManager is not configured propertly. Control ## not found)
0
Steve
Telerik team
answered on 03 Jun 2008, 02:17 PM
Hello Sergey,

Actually it is a bit more complicated. Every AjaxSetting corresponds to a dynamically created UpdatePanel control with the initiator control set as trigger. So in such cases the error will be thrown from the MS AJAX library itself as can be seen from the stack trace. However I've just tried the same settings on a PlaceHolder in a simple scenario and it worked - so something else is causing this erratic behaviour.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Sergey
Top achievements
Rank 1
answered on 03 Jun 2008, 02:54 PM
Removed RadAjaxManager, putted grid inside of UpdatePanel, submitting goes without issues. Have no idea why crash occurs with RadAjaxManager
Tags
Ajax
Asked by
Sergey
Top achievements
Rank 1
Answers by
Steve
Telerik team
Sergey
Top achievements
Rank 1
Share this question
or