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

Error with UpdatePanel

1 Answer 65 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
VnDevil
Top achievements
Rank 2
VnDevil asked on 18 Jun 2010, 08:56 AM
Hi telerik,

I have errors when using RadAjaxManager with UpdatePanel in below code

ASPX:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <asp:ScriptManager ID="ScriptManager" runat="server" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Button1"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="TextBox1"></telerik:AjaxUpdatedControl> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
         
        <asp:UpdatePanel ID="UpdatePanel1" runat="server"
            <ContentTemplate> 
                <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
 
                    <script type="text/javascript" language="javascript"
                        function AjaxRequestButton(arguments) { 
                            var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>"); 
                            ajaxManager.ajaxRequestWithTarget('<%= Button1.UniqueID %>', ''); 
                        } 
                    </script> 
 
                </telerik:RadCodeBlock> 
                 
                <asp:Button ID="Button1" runat="server" Text="Button AjaxManager" OnClick="Button1_Click"></asp:Button> 
                 
                <asp:Button ID="Button2" runat="server" Text="Button PostBack" OnClick="Button2_Click"
                </asp:Button> 
                 
                <br /> 
                <asp:TextBox ID="TextBox1" runat="server" Width="100%"></asp:TextBox> 
            </ContentTemplate> 
        </asp:UpdatePanel> 
    </div> 
    </form> 
</body> 
</html> 

Code-behind
        protected void Button1_Click(object sender, EventArgs e) 
        { 
            TextBox1.Text = "Button Ajax has been clicked"
        } 
 
        protected void Button2_Click(object sender, EventArgs e) 
        { 
            TextBox1.Text = "Button PostBack has been clicked"
        } 

When click Button AjaxManager then click Button PostBack, it have an error occurred below but not often
Webpage error details 
 
Message: 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 'Telerik.Web.UI 2010.'. 
Line: 4723 
Char: 21 
Code: 0 
URI: http://localhost:10956/ScriptResource.axd?d=25viXrHNq8PHOF300A5rNLFxBJoONHwrIidSkSN-ZqB_-VYBht_Zy2ADVs_3NtVl4UXYPXO49gST9fKJiXe9_bvHaHgalpS_ozIgi-6XdgE1&t=ffffffffec2d9970 
 
 


Please help me fix it, thanks



1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 18 Jun 2010, 01:16 PM
Hello,

The specified message is not an error in your code as this is the Telerik trial message. It will stop popping up as soon as you upgrade to the Dev version of the controls.

However please note the it is not suggested to ajaxify particular page content with more than one ajax control. Therefore I suggest that you choose either the RadAjaxManager or the ASP:UpdatePanel in your case but using them both.

Best wishes,
Iana
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
Ajax
Asked by
VnDevil
Top achievements
Rank 2
Answers by
Iana Tsolova
Telerik team
Share this question
or