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

__EVENTVALIDATION size is growing with every post back

1 Answer 215 Views
XmlHttpPanel
This is a migrated thread and some comments may be shown as answers.
Doug Swanson
Top achievements
Rank 1
Doug Swanson asked on 23 Jun 2010, 08:10 PM
I have a worklist (RadGrid) inside a XmlHttpPanel on a page.  The grid gets refreshed every 30 seconds.  The data inside the grid is remaining the same but the size of the post body is growing with every interval.  I am using FF and Firebug to evaluate what is going out on the wire.  I can see that the __EVENTVALIDATION is increasing with each post...below is a sample of the javascript used to invoke the postback...any insight would be greatly appreciated.  Thanks Doug
 var wlCtrlGridID = null;
 var wlCtrlAutoRefreshRate = 10000;
 var wlIntervalId = 0;
function startWorklistRefresh() {
                if (wlIntervalId == 0) {
                    wlIntervalId = setInterval("reloadWorklist();", wlCtrlAutoRefreshRate);
                }
            }
            function reloadWorklist() {
                $find("<%= XmlGridPanel.ClientID %>").set_value("Reload");
            }
            function cancelWorklistRefresh() {
                clearInterval(wlIntervalId);
                wlIntervalId = 0;
            }
            function GridXmlPanel_OnResponseEnded(sender, args) {
                startWorklistRefresh();
            }

<asp:Panel ID="PnlGrid" runat="server" style="margin-top: -4px; margin-left: 3px;">
        <telerik:RadXmlHttpPanel ID="XmlGridPanel" runat="server" OnServiceRequest="GridXmlPanel_OnServiceRequest"
            OnClientResponseEnded="GridXmlPanel_OnResponseEnded" EnableClientScriptEvaluation="true">
            <telerik:RadGrid id="GridWorklist" runat="server" SkinID="main" GridLines="None" style="outline: none;"
                OnItemCreated="GridWorklist_ItemCreated" OnItemDataBound="GridWorklistt_ItemDataBound">.....


1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 28 Jun 2010, 01:45 PM
Hi Doug,

I tested the following code and the data posted to the server is always of the same size (around 4KB):

.aspx
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
 
        <script type="text/javascript">
            var wlCtrlGridID = null;
            var wlCtrlAutoRefreshRate = 10000;
            var wlIntervalId = 0;
            function startWorklistRefresh()
            {
                if (wlIntervalId == 0)
                {
                    alert("Start");
                    wlIntervalId = setInterval("reloadWorklist();", wlCtrlAutoRefreshRate);
                }
            }
            function reloadWorklist()
            {
                //alert("Set Value");
                $find("<%= XmlGridPanel.ClientID %>").set_value("Reload");
            }
            function cancelWorklistRefresh()
            {
                //clearInterval(wlIntervalId);
                ///wlIntervalId = 0;
            }
            function GridXmlPanel_OnResponseEnded(sender, args)
            {
                //startWorklistRefresh();
            }
        </script>
 
    </telerik:RadScriptBlock>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
        </Scripts>
    </asp:ScriptManager>
    <asp:Button ID="Button2" runat="server" Text="Postback" />
    <input value="Set Value (callback)" onclick="startWorklistRefresh(); return false;"
        type="button" />
    <div>
        <telerik:RadXmlHttpPanel ID="XmlGridPanel" runat="server" OnServiceRequest="XmlPanel1_ServiceRequest"
            OnClientResponseEnded="GridXmlPanel_OnResponseEnded" EnableClientScriptEvaluation="true">
            <telerik:RadGrid ID="Grid1" runat="server" GridLines="None" Style="outline: none;"
                OnItemCreated="GridWorklist_ItemCreated" OnItemDataBound="GridWorklistt_ItemDataBound">
            </telerik:RadGrid>
        </telerik:RadXmlHttpPanel>
    </div>
    </form>
</body>
</html>

.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class XmlPanel_Lifecycle : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
 
    protected void GridWorklist_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
    }
 
    protected void GridWorklistt_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
    }
 
    protected void XmlPanel1_ServiceRequest(object sender, Telerik.Web.UI.RadXmlHttpPanelEventArgs e)
    {
        Grid1.DataSource = new string[] { DateTime.Now.ToString(), "1", "2", "3", "4", "5", "1", "2", "3", "4", "5", "1", "2", "3", "4", "5", "1", "2", "3", "4", "5" };
        Grid1.DataBind();
    }
}

I have attached a screenshot showing that the __EVENTVALIDATION is exactly the same after a couple of ASP.NET callbacks to the server.

Could you please provide a fully working (sample) project that shows the increasing of the posted data, on every callback to the server?

PS. Please note that, RadXmlHttpPanel can also use WebService to update its content. The data posted to the server in this case, is the value set to the XmlHttpPanel.

All the best,
Pero
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
XmlHttpPanel
Asked by
Doug Swanson
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or