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

Filtering Grid or Listview I get Error: Sys.WebForms.PageRequestManagerParserErrorException:

3 Answers 153 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cherif Diallo
Top achievements
Rank 1
Cherif Diallo asked on 21 Dec 2010, 04:40 PM
VS 2008
Telerik version 2010.1.519.35


Up until 2 days ago this web page was working fine, I could use the radfilter to get the subset of data I needed.

Yesterday, I tried to use the web page, The following error keeps poping up

Line: 4723
Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '

<!DOCTYPE html P'.


so I activated the Grid filter no better luck the error keeps poping. The Grid sorting function give the same error
Do not ask  what I did  or modify the answer is Nothing. The only thing I may think of, would be, the automatic windows update that may update the framework!!!!!
 
Can annyone help

find attached a sample of my data I queried from SQL SERVER


thanks
Cherif diallo

***************************
FORM CODE
***************************
<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/Admin/Main2c.master" AutoEventWireup="true" CodeFile="ListeDocuments.aspx.cs" Inherits="Administration_CMG_ListeDocuments" %><br><br><asp:Content ID="Content1" ContentPlaceHolderID="cphLeft" Runat="Server"><br></asp:Content><br><asp:Content ID="Content2" ContentPlaceHolderID="cphright" Runat="Server"><br><telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7"><br></telerik:RadSkinManager><br><asp:UpdatePanel runat="server"><br><ContentTemplate><br>    <telerik:RadFilter ID="rfDocumentations" runat="server" FilterContainerID="rlvDocumentations"><br>    <br>    </telerik:RadFilter><br>     <div class="RegistrationPage"><br>        <div class="clear"><br>        </div><br>        <div class="body"><br>            <div class="SectionBody"><br>              <table class="TableContainer"><br>                <tbody><br>                    <tr class="Row"><br>                        <td class="ItemName" ><br>                            <asp:Button ID="btnAjouter" runat="server" Text="Button" /><br>                       </td><br>                        <td class="ItemValue" ><br>                        </td><br>                    </tr><br>                </tbody><br>              </table><br>            </div><br>        </div><br>    </div><br>    <telerik:RadGrid ID="rlvDocumentations" runat="server" <br>        AllowSorting="true" <br>        AutoGenerateColumns="false"<br>        AllowPaging="true"<br>        AllowFilteringByColumn="true" <br>        onneeddatasource="rlvDocumentations_NeedDataSource"><br>    <MasterTableView DataKeyNames="PkId"><br>        <Columns><br>            <telerik:GridDateTimeColumn <br>                DataField="PublicationDate" <br>                DataType="System.DateTime" <br>                HeaderText="Publication Date" <br>                UniqueName="PublicationDate" <br>                DataFormatString="{0:dd MMM yyyy}"<br>                ItemStyle-Width="130px" <br>                AllowFiltering="True" <br>                AllowSorting="True"><br>            </telerik:GridDateTimeColumn><br>            <telerik:GridBoundColumn <br>                DataField="RaisonSociale" <br>                HeaderText="Raison Sociale" <br>                SortExpression="RaisonSociale"<br>                UniqueName="RaisonSociale" <br>                AllowFiltering="True" <br>                AllowSorting="True"><br>            </telerik:GridBoundColumn><br>            <telerik:GridTemplateColumn DataField="Title" <br>                HeaderText="Title" <br>                UniqueName="Title" <br>                AllowFiltering="True"><br>                <ItemTemplate><br>                              <a href="<%#GetRelativeLink(Eval("Slug").ToString()) %>" ><%#Eval("Title").ToString()%></a><br>                </ItemTemplate><br>            </telerik:GridTemplateColumn><br>    </Columns><br><br>    </MasterTableView><br>    </telerik:RadGrid><br></ContentTemplate><br></asp:UpdatePanel><br></asp:Content>







**************************
END FORM CODE
**************************

***********************
CODE BEHIND
***********************
using System;<br>using System.Collections.Generic;<br>using System.Linq;<br>using System.Web;<br>using System.Web.UI;<br>using System.Web.UI.WebControls;<br>using System.Data;<br>#region Using<br>using Norvatech.BLL;<br>using Norvatech.BusinessEntities;<br>using Norvatech.ResourceSettings.BLL;<br>using Norvatech.ResourceSettings.BusinessEntities;<br>using Norvatech.ResourceSettings.DAL;<br>using Norvatech.Common.IP;<br>using Norvatech.Common;<br>using Norvatech.Common.Caching;<br>using Telerik.Web.UI;<br>#endregion Using<br><br>public partial class Administration_CMG_ListeDocuments : System.Web.UI.Page<br>{<br>    protected void Page_Load(object sender, EventArgs e)<br>    {<br>        if (!Page.IsPostBack)<br>        {<br>            BindData();<br>            string urlBase = Request.AppRelativeCurrentExecutionFilePath;<br>            string urlrelative = urlBase.Replace(Request.Url.Segments[Request.Url.Segments.Length - 1], GetRelativeLink(GetLocaleResource("Company.NewCompanyUrl")));<br><br>            this.btnAjouter.PostBackUrl = urlrelative;<br><br>        }<br><br>    }<br>    protected void Page_PreInit(object sender, EventArgs e)<br>    {<br>        if (!Page.IsPostBack && !Page.IsCallback)<br>        {<br>            if ((Request.QueryString.Get("DocumentGroup") != null) && (Request.QueryString.Get("DocumentGroup").ToString().Trim().Length > 0))<br>            {<br>                DocumentGroup = Request.QueryString.Get("DocumentGroup").ToString().Trim();<br>            }<br><br>        }<br>    }<br>    public string DocumentGroup<br>    {<br>        get<br>        {<br>            if (ViewState["DocumentGroup"] != null)<br>            {<br>                return (string)ViewState["DocumentGroup"];<br>            }<br>            return null;<br>        }<br>        set<br>        {<br>            ViewState["DocumentGroup"] = value;<br>        }<br>    }<br>    public string GetLocaleResource(string resourcename)<br>    {<br>        string reternedval = resourcename;<br>        if (!string.IsNullOrEmpty(resourcename))<br>        {<br>            GetResources();<br><br>            foreach (LocalizedResources lsr in LocalResources)<br>            {<br>                if (lsr.ResourceName == resourcename)<br>                {<br>                    reternedval = lsr.LocalizationResourceValue;<br>                    break;<br>                }<br>            }<br>        }<br>        return reternedval;<br>    }<br>    private LocalizedResourceCollection LocalResources<br>    {<br>        get<br>        {<br>            if (ViewState["CompanyResources"] != null)<br>            {<br>                return (LocalizedResourceCollection)ViewState["CompanyResources"];<br>            }<br>            return null;<br>        }<br>        set<br>        {<br>            ViewState["CompanyResources"] = value;<br>        }<br>    }<br>    private DataSet MembersList<br>    {<br>        get<br>        {<br>            if (ViewState["MembersList"] != null)<br>            {<br>                return (DataSet)ViewState["MembersList"];<br>            }<br>            return null;<br>        }<br>        set<br>        {<br>            ViewState["MembersList"] = value;<br>        }<br><br>    }<br>    override protected void OnInit(EventArgs e)<br>    {<br>        InitializeComponent();<br>        base.OnInit(e);<br>    }<br>    private void InitializeComponent()<br>    {<br>        GetResources();<br>        LocalizeFilter();<br>    }<br>    private void GetResources()<br>    {<br>        if ((this.LocalResources == null) || (this.LocalResources.Count == 0))<br>        {<br>            LocalizedResourceCollection myresources = NSIResourceManager.GetResources(ResourceModules.Documentations, Norvatech.Common.Context.Current.CurrentLanguage.PkId);<br>            this.LocalResources = myresources;<br>        }<br><br>    }<br>    private void LocalizeFilter()<br>    {<br>        foreach (LocalizedResources lsr in LocalResources)<br>        {<br>            if (lsr.ResourceName == "GridFilter.AddExpressionToolTip") this.rfDocumentations.AddExpressionToolTip = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.AddGroupToolTip") this.rfDocumentations.AddGroupToolTip = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.ApplyButtonText") this.rfDocumentations.ApplyButtonText = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.Between") this.rfDocumentations.Localization.FilterFunctionBetween = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.BetweenDelimeterText") this.rfDocumentations.BetweenDelimeterText = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.Contains") this.rfDocumentations.Localization.FilterFunctionContains = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.DoesNotContain") this.rfDocumentations.Localization.FilterFunctionDoesNotContain = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.EndsWith") this.rfDocumentations.Localization.FilterFunctionEndsWith = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GreaterThan") this.rfDocumentations.Localization.FilterFunctionGreaterThan = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GreaterThanOrEqualTo") this.rfDocumentations.Localization.FilterFunctionGreaterThanOrEqualTo = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GroupOperationAnd") this.rfDocumentations.Localization.GroupOperationAnd = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GroupOperationNotAnd") this.rfDocumentations.Localization.GroupOperationNotAnd = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GroupOperationNotOr") this.rfDocumentations.Localization.GroupOperationNotOr = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.GroupOperationOr") this.rfDocumentations.Localization.GroupOperationOr = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.IsEmpty") this.rfDocumentations.Localization.FilterFunctionIsEmpty = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.IsNull") this.rfDocumentations.Localization.FilterFunctionIsNull = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.LessThan") this.rfDocumentations.Localization.FilterFunctionLessThan = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.LessThanOrEqualTo") this.rfDocumentations.Localization.FilterFunctionLessThanOrEqualTo = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.NotBetween") this.rfDocumentations.Localization.FilterFunctionNotBetween = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.NotEqualTo") this.rfDocumentations.Localization.FilterFunctionNotEqualTo = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.EqualTo") this.rfDocumentations.Localization.FilterFunctionEqualTo = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.NotIsEmpty") this.rfDocumentations.Localization.FilterFunctionNotIsEmpty = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.NotIsNull") this.rfDocumentations.Localization.FilterFunctionNotIsNull = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.RemoveToolTip") this.rfDocumentations.RemoveToolTip = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.StartsWith") this.rfDocumentations.Localization.FilterFunctionStartsWith = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "GridFilter.ToolTip") this.rfDocumentations.ToolTip = lsr.LocalizationResourceValue;<br>            //if (lsr.ResourceName == "Filter.Usethistofilter") lbfilter.Text = lsr.LocalizationResourceValue;<br>            if (lsr.ResourceName == "Button.btnAdd") this.btnAjouter.Text = lsr.LocalizationResourceValue;<br><br><br>        }<br>    }<br>    public string GetRelativeLink(string slug)<br>    {<br>        return string.Concat("Ed/0101-", slug.Trim(), ".aspx");<br>    }<br>    public string FormatDate(DateTime date)<br>    {<br>        return string.Format("{0:dd MMM yyyy}", date);<br>    }<br>    private void BindData()<br>    {<br>        if (DocumentGroup != null)<br>            MembersList = DocumentationsManager.GetDocumentationAllSet(Norvatech.Common.Context.Current.CurrentLanguage.PkId, DocumentGroup);<br><br>        if (MembersList != null)<br>        {<br>            rlvDocumentations.DataSource = MembersList;<br>            rlvDocumentations.DataBind();<br>        }<br>        else<br>            this.Visible = false;<br>    }<br>    protected void rfDocumentations_FieldEditorCreated(object sender, RadFilterFieldEditorCreatedEventArgs e)<br>    {<br>        if (e.Editor.FieldName == "RaisonSociale") e.Editor.DisplayName = GetLocaleResource("Documentations.RaisonSociale");<br>        if (e.Editor.FieldName == "Title") e.Editor.DisplayName = GetLocaleResource("Documentations.Title");<br>        if (e.Editor.FieldName == "PublicationDate") e.Editor.DisplayName = GetLocaleResource("Documentations.PublicationDate");<br><br>    }<br>    protected void rlvDocumentations_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)<br>    {<br>        rlvDocumentations.DataSource = MembersList;<br><br>    }<br>}


**************************
END CODE BEHIND
*************************

DATA SAMPLE

<?xml version="1.0" encoding="utf-8" ?><br><ListInfo><br>    <itemInfo><br>        <RaisonSociale>SEMAFO GUINÉE SA.</RaisonSociale><br>        <PkId>1348D2D2-9E27-4750-80B3-7A54799A0819</PkId><br>        <CompanyID>46FF86E4-84FF-4504-A0B8-39D02523DFB2</CompanyID><br>        <PublicationDate>2010-12-17 16:20:45</PublicationDate><br>        <Auteur>Cherif Diallo</Auteur><br>        <Title>Formulaire d'enregistrement d'entreprise</Title><br>        <Slug>formulaire-d-enregistrement-d-entreprise</Slug><br>        <Visible>1</Visible><br>        <GroupTitle>Formulaires</GroupTitle><br>    </itemInfo><br></ListInfo><br>

3 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 27 Dec 2010, 09:51 AM
Hi Cherif Diallo,

Could you please temporarily disable AJAX on the page, so you can test if a server-side exception is thrown, what is it and where exactly it happens?

Ususally this error is related to AJAX usage, so could you also confirm if changing the UpdateMode property of the UpdatePanel makes any change? Also, you can try using a RadAjaxPanel or RadAjaxManager (with RadGrid updates itself setting) instead of the UpdatePanel to see how the page behaves.

Greetings,
Tsvetina
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.
0
Hany
Top achievements
Rank 1
answered on 02 Jan 2014, 01:40 PM
Hi all,
I have the same error appears only on IE 11, but all other browsers it works fine, I'm searching the internet for a fix for this problem but didn't find.

Note:
I tried the your demo on 
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx
but the surprise was that it raises the same error:

Line: 15
Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '
<!DOCTYPE html PUB'.

I attached the a screen shot of the error, please I need a very urgent help.

Regards
0
Hany
Top achievements
Rank 1
answered on 05 Jan 2014, 07:49 AM
The cause of the problem was that IE 11 should run as administrator to be able to run AJAX requests, may be Windows 2012 security issue.


Regards
Tags
Grid
Asked by
Cherif Diallo
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Hany
Top achievements
Rank 1
Share this question
or