Server Error while adding multiple items

5 posts, 0 answers
  1. Lokesh
    Lokesh avatar
    89 posts
    Member since:
    Jul 2012

    Posted 27 Feb 2014 Link to this post

    Hi Team,
    I have a page with Radgrid, LoadingPanel, and some ASP Panels on it.
    My grid has more than 1000 items on it and I don't want paging also. So I have to show all items on single page only. 
    The number of items on page may vary, can be greater or less than 1000.
    When I select all items on page and click Add button, it throws a server error. 

    JavaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500

    When I test the same scenario on a published link, I get different error message.
    A script on this page is causing Internet explorer to run slowly. If it continues to run, your computer might become unresponsive

    Here is my MasterPage:
    001.<%@ Master Language="C#" AutoEventWireup="true" Inherits="ModuleMasterPage" CodeBehind="ModuleMasterPage.master.cs" %>
    002. 
    003.<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="act" %>
    004.<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    005.<!DOCTYPE html>
    006.<html xmlns="http://www.w3.org/1999/xhtml">
    007.<head id="Head1" runat="server">
    008.    <title>ERPByNet</title>
    009. 
    010.    <script type="text/javascript" src="../App_Themes/Default/jquery1_7.js"> </script>
    011. 
    012.    <script src="../js/RadWindowMethods.js" type="text/javascript"></script>
    013. 
    014.    <script src="../js/OpenStatusPopup.js" type="text/javascript"></script>
    015.     
    016.    <link rel="stylesheet" href="../RupeesFont/RupeeForadianStylesheet.css" type="text/css" charset="utf-8" />
    017. 
    018.    <base target="_self" />
    019.      
    020.</head>
    021. 
    022.    
    023. 
    024.<body class="LoginBodyMaster">
    025.    <form id="form1" runat="server">
    026.    <telerik:RadScriptManager ID="ScriptManager" runat="server" EnableTheming="True" AsyncPostBackTimeout="6000">
    027.        <Scripts>
    028.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
    029.            </asp:ScriptReference>
    030.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
    031.            </asp:ScriptReference>
    032.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
    033.            </asp:ScriptReference>
    034.        </Scripts>
    035.    </telerik:RadScriptManager>
    036.    <telerik:RadAjaxManager ID="RadAjaxManagerMaster" runat="server" EnableAJAX="true">
    037.        <AjaxSettings>
    038.            <telerik:AjaxSetting AjaxControlID="rmServiceMenu">
    039.                <UpdatedControls>
    040.                    <telerik:AjaxUpdatedControl ControlID="rmServiceMenu" LoadingPanelID="AjaxLoadingPanel1" />
    041.                </UpdatedControls>
    042.            </telerik:AjaxSetting>
    043.        </AjaxSettings>
    044.    </telerik:RadAjaxManager>
    045.    <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1"
    046.        Style="position: absolute; top: -10; left: -10; height: 100%; width: 100%; z-index:999999;" />
    047.    <div id="HeaderImageDiv" runat="server" class="newHeader">
    048.        <div class="headerLeft">
    049.            <telerik:RadBinaryImage runat="server" ID="XECOMLogo" AutoAdjustImageControlSize="false"
    050.                Width="150px" Height="38px" ToolTip='Application Logo' AlternateText='Application Logo' />
    051.            <asp:Label runat="server" ID="lblModuleName" Text="" Font-Bold="true" CssClass="LblModule"
    052.                Font-Names="arial" />
    053.            <asp:Label runat="server" ID="lblVersion" Text="" Font-Bold="true" Font-Names="arial" />
    054.                         
    055.            <telerik:RadNotification ID="MasterPageNotifier" runat="server" AutoCloseDelay="5000"
    056.                EnableShadow="True" Overlay="True" Position="TopLeft" Title="Notification">
    057.                <NotificationMenu ID="TitleMenu">
    058.                </NotificationMenu>
    059.            </telerik:RadNotification>
    060.        </div>
    061.        <div class="headerRight">
    062.            <div style="width: 180px; float: right; margin: 0 0 10px;">
    063.                <telerik:RadBinaryImage runat="server" ID="OrganizationLogo" AutoAdjustImageControlSize="false"
    064.                    Width="150px" Height="38px" ToolTip='Organization Logo' AlternateText='Organization Logo' />
    065.            </div>
    066.          <div style=" float: right; ">
    067.            <asp:Label runat="server" ID="lblUserName" Text="" Font-Bold="false" CssClass="LblUser"
    068.                Font-Names="arial" />
    069.         </div>
    070.            <div style=" float: right; display:none;">
    071.                Themes:<telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Default"
    072.                    ShowChooser="false">
    073.                    <TargetControls>
    074.                        <telerik:TargetControl ControlID="mnuModule" ControlsToApplySkin="RadMenu, RadAjaxLoadingPanel, RadAsynchUpload, RadButton, RadCalendar" />
    075.                    </TargetControls>
    076.                </telerik:RadSkinManager>
    077.            </div>
    078.        </div>
    079.    </div>
    080.    <div id="MastermainDiv" runat="server" class="menuNavigation">
    081.       
    082.        <telerik:RadMenu ID="mnuModule" runat="server" Width="100%" OnItemClick="mnuModule_ItemClick">
    083.            <Items>
    084.                <telerik:RadMenuItem runat="server" NavigateUrl="~/ModuleSelector.aspx" Text="Switch">
    085.                </telerik:RadMenuItem>
    086.            </Items>
    087.        </telerik:RadMenu>
    088. 
    089.        </div>
    090.   
    091.    <div class="space10"></div>
    092.    <div class="mainPlaceholder">
    093.        <div class="mainPlaceholderInner">
    094.            <asp:ContentPlaceHolder ID="MainContentPlaceHolder" runat="server">
    095.            </asp:ContentPlaceHolder>
    096.        </div>
    097.    </div>
    098.   
    099.    <telerik:RadWindowManager ID="msgWindowManager" runat="server" EnableShadow="true">
    100.    </telerik:RadWindowManager>
    101.    <telerik:RadWindow ID="messageWindow" runat="server" Modal="true" Title="Message">
    102.        <ContentTemplate>
    103.            <asp:Label runat="server" ID="lblMessage" Text="" Font-Bold="true" Font-Size="Large"
    104.                Font-Names="arial" />
    105.        </ContentTemplate>
    106.    </telerik:RadWindow>
    107.    </form>
    108.</body>
    109.</html>


    And this is my other page that uses this master page.
    001.<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageGRNForAPInvoices.aspx.cs"
    002.    Inherits="AceFinance.ManageGRNForAPInvoices" MasterPageFile="~/MasterPages/ModuleMasterPage.Master"
    003.    EnableEventValidation="false" ValidateRequest="false" %>
    004. 
    005.<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
    006.<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    007.<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    008.    <telerik:RadAjaxPanel ID="rjxPanel" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
    009.        <fieldset>
    010.            <div>
    011.                <div style="float: right; height: 30px; margin-top: 10px;">
    012.                    <telerik:RadButton ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_OnClick"
    013.                        ToolTip="Add" Visible="false" />
    014.                    <telerik:RadButton ID="btnAddMorePO" runat="server" OnClick="btnAddMorePO_Click"
    015.                        Text="Add / Remove PO" Visible="false" Width="118px" />
    016.                    <telerik:RadButton ID="btnBackInvoice" runat="server" Text="Back" OnClick="btnBackInvoice_OnButtonClick"
    017.                        ToolTip="Back to Invoice" />
    018.                </div>
    019.                <table width="100%" id="tblList" runat="server">
    020.                    <tr id="trList">
    021.                        <td align="center">
    022.                            <table>
    023.                                <tr>
    024.                                    <td align="center">
    025.                                        <asp:TextBox ID="txtPONo" runat="server"></asp:TextBox>
    026.                                        <telerik:RadButton ID="btnAddToList" runat="server" OnClick="btnAddToList_Click"
    027.                                            Text="Add" />
    028.                                    </td>
    029.                                </tr>
    030.                                <tr>
    031.                                    <td align="center">
    032.                                        <asp:ListBox ID="lstPONo" runat="server" SelectionMode="Multiple" Height="300px"
    033.                                            Width="250px"></asp:ListBox>
    034.                                    </td>
    035.                                </tr>
    036.                                <tr>
    037.                                    <td>
    038.                                        <telerik:RadButton ID="btnGetPOList" runat="server" OnClick="btnGetPOList_Click"
    039.                                            Text="Get PO List" Width="90px" />
    040.                                        <telerik:RadButton ID="btnRemoveList" runat="server" OnClick="btnRemoveFromList_Click"
    041.                                            Text="Remove From List" Width="150px" />
    042.                                    </td>
    043.                                </tr>
    044.                            </table>
    045.                        </td>
    046.                    </tr>
    047.                    <tr>
    048.                        <td>
    049.                            <telerik:RadGrid ID="rgGRNForAPInvoices" OnNeedDataSource="rgGRNForAPInvoices_OnNeedDataSource"
    050.                                Visible="false" OnItemDataBound="rgGRNForAPInvoices_ItemDataBound" runat="server"
    051.                                GridLines="None" ShowGroupPanel="False" AllowMultiRowSelection="true" AutoGenerateColumns="False"
    052.                                AllowSorting="True" AllowPaging="false">
    053.                                <MasterTableView Width="100%" GroupsDefaultExpanded="true" ExpandCollapseColumn-Groupable="true"
    054.                                    ExpandCollapseColumn-GroupByExpression="GRNNumber" CommandItemSettings-ShowAddNewRecordButton="false"
    055.                                    GroupLoadMode="Client">
    056.                                    <GroupByExpressions>
    057.                                        <telerik:GridGroupByExpression>
    058.                                            <SelectFields>
    059.                                                <telerik:GridGroupByField FieldAlias="PurchaseOrderNo" FieldName="PurchaseOrderNo"
    060.                                                    FormatString="{0:D}" HeaderValueSeparator=" : "></telerik:GridGroupByField>
    061.                                            </SelectFields>
    062.                                            <GroupByFields>
    063.                                                <telerik:GridGroupByField FieldName="PurchaseOrderNo" SortOrder="Descending"></telerik:GridGroupByField>
    064.                                            </GroupByFields>
    065.                                        </telerik:GridGroupByExpression>
    066.                                    </GroupByExpressions>
    067.                                    <GroupByExpressions>
    068.                                        <telerik:GridGroupByExpression>
    069.                                            <SelectFields>
    070.                                                <telerik:GridGroupByField FieldAlias="GRNNumber" FieldName="GRNNumber" />
    071.                                            </SelectFields>
    072.                                            <GroupByFields>
    073.                                                <telerik:GridGroupByField FieldName="GRNNumber" SortOrder="Ascending" />
    074.                                            </GroupByFields>
    075.                                        </telerik:GridGroupByExpression>
    076.                                    </GroupByExpressions>
    077.                                    <Columns>
    078.                                        <telerik:GridBoundColumn DataField="IsAdvanceAdjusted" UniqueName="IsAdvanceAdjusted"
    079.                                            HeaderText="IsAdvanceAdjusted" Display="false" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    080.                                        </telerik:GridBoundColumn>
    081.                                        <telerik:GridBoundColumn DataField="CashPaymentID" UniqueName="CashPaymentID" HeaderText="CashPaymentID"
    082.                                            Display="false" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    083.                                        </telerik:GridBoundColumn>
    084.                                        <telerik:GridBoundColumn DataField="GRNSequenceNo" UniqueName="GRNSequenceNo" HeaderText="SequenceNo"
    085.                                            Display="false" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    086.                                        </telerik:GridBoundColumn>
    087.                                        <telerik:GridBoundColumn DataField="GRNID" UniqueName="GRNID" HeaderText="GRNID"
    088.                                            Display="false" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    089.                                        </telerik:GridBoundColumn>
    090.                                        <telerik:GridBoundColumn DataField="PartItemID" UniqueName="PartItemID" HeaderText="PartItemID"
    091.                                            Display="false" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    092.                                        </telerik:GridBoundColumn>
    093.                                        <telerik:GridBoundColumn DataField="PartItemTypeID" UniqueName="PartItemTypeID" HeaderText="PartItemTypeID"
    094.                                            Display="false" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    095.                                        </telerik:GridBoundColumn>
    096.                                        <telerik:GridBoundColumn DataField="PartTypeName" UniqueName="PartTypeName" HeaderText="PartTypeName"
    097.                                            Display="false" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    098.                                        </telerik:GridBoundColumn>
    099.                                        <telerik:GridBoundColumn DataField="PurchaseOrderNo" UniqueName="PurchaseOrderNo"
    100.                                            HeaderText="PO No" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    101.                                        </telerik:GridBoundColumn>
    102.                                        <telerik:GridBoundColumn DataField="GRNNumber" UniqueName="GRNNumber" HeaderText="GRN No"
    103.                                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    104.                                            <HeaderStyle Width="15%" />
    105.                                        </telerik:GridBoundColumn>
    106.                                        <telerik:GridBoundColumn DataField="DeliveryOrderNumber" UniqueName="DeliveryOrderNumber"
    107.                                            HeaderText="DO No" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    108.                                        </telerik:GridBoundColumn>
    109.                                         <telerik:GridBoundColumn DataField="SequenceNo" UniqueName="SequenceNo"
    110.                                            HeaderText="Sequence No" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    111.                                        </telerik:GridBoundColumn>
    112.                                        <telerik:GridBoundColumn DataField="DisplayName" UniqueName="DisplayName" HeaderText="Part No"
    113.                                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    114.                                            <HeaderStyle Width="15%" />
    115.                                        </telerik:GridBoundColumn>
    116.                                        <telerik:GridBoundColumn DataField="Price" UniqueName="Price" HeaderText="Unit Price"
    117.                                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    118.                                        </telerik:GridBoundColumn>
    119.                                        <telerik:GridBoundColumn DataField="TaxPrice" UniqueName="TaxPrice" HeaderText="TaxPrice"
    120.                                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" DataFormatString="{0:N}" Display="false">
    121.                                        </telerik:GridBoundColumn>
    122.                                        <telerik:GridBoundColumn DataField="AcceptedQty" UniqueName="AcceptedQty" HeaderText="GRN Qty"
    123.                                            AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    124.                                            <HeaderStyle Width="7%" />
    125.                                        </telerik:GridBoundColumn>
    126.                                        <telerik:GridBoundColumn DataField="RejectedQty" Display="false" UniqueName="RejectedQty"
    127.                                            HeaderText="RejectedQty" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    128.                                        </telerik:GridBoundColumn>
    129.                                        <telerik:GridBoundColumn DataField="InvoicedQuantity" Display="true" UniqueName="InvoicedQuantity"
    130.                                            HeaderText="Invoiced Qty " AutoPostBackOnFilter="true" CurrentFilterFunction="Contains">
    131.                                        </telerik:GridBoundColumn>
    132.                                        <telerik:GridTemplateColumn DataField="InvoicedQuantity" UniqueName="txtInvoicedQuantity"
    133.                                            HeaderText="Consumed Qty" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo">
    134.                                            <ItemTemplate>
    135.                                                <asp:TextBox ID="txtInvoicedQuantity" runat="server" />
    136.                                            </ItemTemplate>
    137.                                        </telerik:GridTemplateColumn>
    138.                                        <telerik:GridBoundColumn UniqueName="TotalAmount" HeaderText="Total Amount(GR)" AutoPostBackOnFilter="true"
    139.                                            CurrentFilterFunction="EqualTo">
    140.                                        </telerik:GridBoundColumn>
    141.                                        <telerik:GridBoundColumn UniqueName="CostEntityID" HeaderText="CostEntityID" DataField="CostEntityID"
    142.                                            AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" Display="false">
    143.                                        </telerik:GridBoundColumn>
    144.                                        <telerik:GridBoundColumn UniqueName="CostEntityKey" HeaderText="CostEntityKey" DataField="CostEntityKey"
    145.                                            AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" Display="false">
    146.                                        </telerik:GridBoundColumn>
    147.                                        <telerik:GridClientSelectColumn UniqueName="ClientSelect" HeaderText="Select">
    148.                                            <HeaderStyle Width="3%" />
    149.                                        </telerik:GridClientSelectColumn>
    150.                                    </Columns>
    151.                                </MasterTableView>
    152.                                <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="false" AllowColumnsReorder="True"
    153.                                    EnablePostBackOnRowClick="false">
    154.                                    <Selecting AllowRowSelect="True"></Selecting>
    155.                                    <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True"
    156.                                        ResizeGridOnColumnResize="False"></Resizing>
    157.                                </ClientSettings>
    158.                                <GroupingSettings ShowUnGroupButton="true" />
    159.                            </telerik:RadGrid>
    160.                        </td>
    161.                    </tr>
    162.                </table>
    163.            </div>
    164.            <asp:Label ID="lbl_MovingBuildingUnitPopUp" runat="server" Visible="true"></asp:Label>
    165.            <asp:Panel ID="pnlAdvanceAdjust" runat="server" CssClass="outerPopup" Style="display: none;
    166.                width: 450px; height:auto; margin: auto; float: none; text-align: center;">
    167.                <asp:Panel ID="Panel3" runat="server" BorderWidth="1" Width="100%"
    168.                    HorizontalAlign="Center" CssClass="innerPopup" Style="height:auto;">
    169.                    <table width="100%" style="height:auto%">
    170.                        <tr style="height:90%">
    171.                            <td style="width:100%; height:auto%">
    172.                                <asp:TextBox ID="lbl_NotifyMessage" runat="server" Enable="false" Width="99%" Height="100%" TextMode="MultiLine" ReadOnly="true"></asp:TextBox>
    173.                            </td>
    174.                        </tr>
    175.                        <tr style="height:auto%">
    176.                            <td align="center" style="width:100%; height:10%">
    177.                                <telerik:RadButton ID="btnOK" runat="server" ToolTip="OK" Text="Ok" />
    178.                            </td>
    179.                        </tr>
    180.                    </table>
    181.                </asp:Panel>
    182.            </asp:Panel>
    183.            <cc1:ModalPopupExtender ID="ModalPopupExtenderForAdjustedPO" runat="server"
    184.                PopupControlID="pnlAdvanceAdjust" TargetControlID="lbl_MovingBuildingUnitPopUp"
    185.                OkControlID="btnOK" BackgroundCssClass="modalBackground">
    186.            </cc1:ModalPopupExtender>
    187.            <asp:HiddenField ID="HiddenField_APInvoiceID" runat="server" />
    188.            <asp:HiddenField ID="HiddenField_VendorID" runat="server" />
    189.            <asp:HiddenField ID="HiddenField_COASetDetailIDFooter" runat="server" />
    190.            <asp:HiddenField ID="HiddenField_EventID" runat="server" />
    191.            <asp:HiddenField ID="HiddenField_CurrencyID" runat="server" />
    192.            <asp:HiddenField ID="HiddenField_PONoList" runat="server" />
    193.            <asp:HiddenField ID="HiddenField_GRNIDList" runat="server" />
    194.            <asp:HiddenField ID="HiddenField1_SequenceNoList" runat="server" />
    195.        </fieldset>
    196.    </telerik:RadAjaxPanel>
    197.</asp:Content>

    It throws this error when btnAdd_OnClick event occurs.

    Could you please help me with this issue??


    Thanks,
    Lok..
  2. Lokesh
    Lokesh avatar
    89 posts
    Member since:
    Jul 2012

    Posted 27 Feb 2014 in reply to Lokesh Link to this post

    I am using IE8.

    I am not able to edit my current post. I was able to edit it.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 04 Mar 2014 Link to this post

    Hi Lokesh,

    To prevent such warning message, you must have less number of rows in the page. To optimize the performance consider reducing the number of visible column as much as possible (either hiding some of the columns or removing them completely and extracting their values on the client using key values), enable paging or virtual scrolling for grid, and disable the client-side features which you do not intend to use.

    Additional hints about how to speed up the performance of our web grid can be found here:
    http://www.telerik.com/products/aspnet-ajax/resources/top-performance.aspx
    http://www.telerik.com/help/aspnet-ajax/grid-overview.html (Chapter "Performance tips and tricks")

    Regards,
    Maria Ilieva
    Telerik
    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 UI for ASP.NET AJAX, subscribe to the blog feed now.
  5. Lokesh
    Lokesh avatar
    89 posts
    Member since:
    Jul 2012

    Posted 04 Mar 2014 in reply to Maria Ilieva Link to this post

    Thanks Maria for your reply.
    My client wants to see all data in a single page.
    But now I am forcing him to use paging. :D
    And the links you provided, I have bookmarked them.
    Thanks once again. :)
  6. Jok
    Jok avatar
    4 posts
    Member since:
    May 2014

    Posted 15 Apr 2015 Link to this post

    In my case it's an ISS issue, If your running your project in IIS express in VS 2013 like mine try changing this

    <script type="text/javascript" src="../App_Themes/Default/jquery1_7.js"> </script>

    <script src="../js/RadWindowMethods.js" type="text/javascript"></script>

    <script src="../js/OpenStatusPopup.js" type="text/javascript"></script>

    <link rel="stylesheet" href="../RupeesFont/RupeeForadianStylesheet.css" type="text/css"

     

    To This, change (../) to tilde(~/)

     

    <script type="text/javascript" src="~/App_Themes/Default/jquery1_7.js"> </script>

    <script src="~/js/RadWindowMethods.js" type="text/javascript"></script>

    <script src="~/js/OpenStatusPopup.js" type="text/javascript"></script>

    <link rel="stylesheet" href="~/RupeesFont/RupeeForadianStylesheet.css" type="text/css" 

     

    My reference :

    https://msdn.microsoft.com/en-us/library/58wxa9w5.aspx

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017