Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All, I am using UpdatePanel for My Website which all controls of Ajax 4.0 works fine except the UpdatePanel. I am using VS 2010 and Ajax 4.0 with bellow simple code but I am getting an error which does not provide enought information.

ASPX Page Code
XML
<div>
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" >
        <ContentTemplate>
        <asp:TextBox runat="server" ID="txt"></asp:TextBox>
        <asp:LinkButton runat="server" ID="btn" Text="Save" onclick="btn_Click"></asp:LinkButton>
        </ContentTemplate>
        </asp:UpdatePanel>
    </div>


Code Behind

C#
protected void btn_Click(object sender, EventArgs e)
{
        txt.Text = "Updated..";
}


Error While Loading Page
MSIL
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 4.0.20506; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.30729)
Timestamp: Fri, 14 Jan 2011 14:32:16 UTC

Message: Sys.ArgumentNullException: Value cannot be null.
Parameter name: panelsCreated[1]
Line: 157
Char: 12
Code: 0
URI: http://localhost/SDU/ScriptResource.axd?d=MDaM6TjDTGWQCy4n3IuBEN_ycdt0JqxmU6EucUsq_cr2s5FGE_al8YZWIA-mu0xQ-uX0D22OKimDy_DScsPx2w2&t=11e6618b


all Ajax 4.0 Controls works fine except the UpdatePanel.
Posted

1 solution

Try these which has solution

Sys.ArgumentNullException: Value cannot be null. Parameter name: postBackElement[^]

Report viewer web part problems[^]

Sys.ArgumentNullException: Value cannot be null.[^]

EDIT
------------------
OP wrote:
Error Message: Sys.InvalidOperationException: Could not find UpdatePanel with ID ''. If it is being updated dynamically then it must be inside another UpdatePanel.

Here you go

SOLUTION : Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ContentPlaceHolder1_updatePanel1'. If it is being updated dynamically then it[^]
 
Share this answer
 
v2
Comments
Abdul Rahman Hamidy 26-Jan-11 9:25am    
thanks for reply, I tried debug="false" in web.Config file, the problem is solved but now I am getting bellow error
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 4.0.20506; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.30729)
Timestamp: Wed, 26 Jan 2011 14:23:51 UTC


Message: Sys.InvalidOperationException: Could not find UpdatePanel with ID ''. If it is being updated dynamically then it must be inside another UpdatePanel.
Line: 2
Char: 74672
Code: 0
URI: http://localhost/SDU/ScriptResource.axd?d=IDEF6S5g92VWXUA2SbDEfEypgy5lSHxsVjkEImUEM3QCjnl7sGMdQ8mEkpEXVxUH0&t=11e6618b

I googled alot and find out solutions but none worked for me. any ideas?
thatraja 26-Jan-11 10:55am    
Check my updated answer
Abdul Rahman Hamidy 26-Jan-11 12:28pm    
thanks, I already tried the link but there is not clear solution on that link.

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



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