Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

.NET 4.5.2 framework Asyncpostback trigger is not working in VS2015.

$
0
0

Hi Team,

AsynPostBack Trigger is not working in .NET 4.5.2 (VS2015).Also, i tried with .NET 4.6.1 and 4.6.2 still issue persist.But,same code is working fine in VS2010(.NET 4.0).

Ajax control tool kit version is 16.1.0.0. 

Since we are upgrading .NET 4.0 to 4.5.2 using VS2015 and it's a show stopper issue. Please give a workaround/fix.

Steps to reproduce the below issue. 

Issue:

0x800a139e - JavaScript 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 'hello1|#||4|240|upda'.

Markup:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<%@ Register TagPrefix="ajx" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" ID="uDoc" EnablePartialRendering="true" ScriptMode="Release"></asp:ScriptManager>
<div>
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Name"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Save" Type="submit" OnClick="Button1_Click" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="click"/>
</Triggers>
</asp:UpdatePanel>

</div>
</form>
</body>
</html>

Code behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}

protected void Button1_Click(object sender, EventArgs e)
{
var txt =TextBox1.Text;
Response.Write(txt);
}
}
}

Thanks.

Regards,

Sarathi.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>