Click here to Skip to main content
15,883,997 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am getting the following error when using AsyncPostBackTrigger to the ASP.NET Button control in ASPX View Page in my MVC Application.

Microsoft JScript runtime 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>
<ht'.>

When i use PostBackTrigger to the button it will work fine but according to the requirements i should go through the AsyncPostBackTrigger.

Note: I am using this ASPX View Page in Razor View Page.

any ideas to solve this issue!
Posted
Updated 23-Jun-12 3:35am
v2
Comments
Jephunneh Malazarte 4-Mar-13 3:00am    
hello does this issue still persist? and what is your solution? i encountered same scenario.

 
Share this answer
 
Comments
Espen Harlinn 23-Jun-12 10:10am    
5'ed!
Bhavesh Marathe 6-Aug-13 4:22am    
Good, My Problem solved, Thanks u.
Sandeep Mewara 23-Jun-12 11:15am    
:)
Sandeep Mewara 6-Aug-13 5:15am    
Welcome
surya85 25-Jun-12 1:58am    
Hi Sandeep,

Thanks for your interest

I have already gone through the links which provided me

Still the problem is persists.

any other ideas on this?
ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
scriptManager.RegisterPostBackControl(this.btnsubmit);
 
Share this answer
 
Comments
BeamingJo 23-Jan-13 8:20am    
Hi neerajkumarmodi,

Thanks for your solution.
I tried this but I still can't make my AJAX postback working correctly.

How will you execute a postback on a panel called e.g. "PanelTest"?
rituranjan2002 8-Apr-13 2:38am    
Thanks This is working when i put this code on page load with my button name
example:
protected void Page_Load(object sender, EventArgs e)
{
ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
scriptManager.RegisterPostBackControl(this.lnkSeasonTicket);
scriptManager.RegisterPostBackControl(this.lnkIndividualTicket);
scriptManager.RegisterPostBackControl(this.lnkGrDiscount);
scriptManager.RegisterPostBackControl(this.lnkSalesTax);
}
kishore sharma 8-Apr-13 5:27am    
Interesting.......
if this code alone does the part of update panel it will be very good,will try with this.
Thanks
CraigJahnke 19-Aug-14 17:11pm    
This worked for me. Thanks!
Member 10773921 26-Aug-14 8:02am    
Thanks...This helped me a lot...
I scratched for this error for more then 6 months i was unable to trace this error then one day i just removed the update panel and come to know that there was an error at server side code .
so something went wrong and its out of scope of script manager.

as I also visited many links related this errors,even then unable to solve by those details as it was not clear what causes this error.
So i am posting here the Solution for this Error.
Just remove the updated panel and debug you will find error and fix that error and then put update panel again.

go to
Cick Here


thanks-Hope this will help to some one facing the issue
 
Share this answer
 
Comments
kishore sharma 5-Apr-13 6:40am    
Hi who ever down vote the answer please put the reason so the person don't repeat the things.
its doesn't make sense downvoting without reason please mention the reason
Thanks
rituranjan2002 8-Apr-13 2:39am    
better to remove update panel add this code
Thanks This is working when i put this code on page load with my button name example: protected void Page_Load(object sender, EventArgs e) { ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page); scriptManager.RegisterPostBackControl(this.lnkSeasonTicket); scriptManager.RegisterPostBackControl(this.lnkIndividualTicket); scriptManager.RegisterPostBackControl(this.lnkGrDiscount); scriptManager.RegisterPostBackControl(this.lnkSalesTax); }
Please Apply try catch this error comes bcoz your are getting runtime Exception

C#
try
{
//your code here 
}
catch(Excption ex)
{
 Responce.Write(ex.Message);
}


and debug your code you will get error in "ex.Message"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900