I have on aspx page several UpdatePanel components. For putting to page I use:
ScriptManager.RegisterStartupScript(Page, Page.GetType(),
Guid.NewGuid().ToString(),
"alert('Some message to user.');",
true);
I get offten the error:
Error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'dlOrders_ctl04_ctl03'. If it is being updated dynamically then it must be inside another UpdatePanel.
code which has been placed doesn't seem to have any connection with the error, please check if there a updatepanel with ID 'dlOrders_ct104_ct103' in the page
If you want to modify the properties of an UpdatePanel on the server side during a partial postback, that UpdatePanel itself must be contained in another UpdatePanel's ContentTemplate.
So, for example, if you wanted to set an UpdatePanel's Visible property to false during a partial postback, that UpdatePanel would need to be in another UpdatePanel.
Typically, if you get this error, you should reconsider the design of your page. Treat the UpdatePanel more like a PlaceHolder than a Pane
Update panels are set to always postback. For dynamically generated items this will not work since they will not always be there. After resetting all of my update panels to updatemode=conditional, everything works like a charm.
vns955
Member
1 Points
13 Posts
Bug with UpdatePanel
May 26, 2012 09:54 PM|LINK
Hello all
I have on aspx page several UpdatePanel components. For putting to page I use:
ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('Some message to user.');", true);I get offten the error:
Thanks for any advices!
Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: Bug with UpdatePanel
May 27, 2012 08:08 AM|LINK
code which has been placed doesn't seem to have any connection with the error, please check if there a updatepanel with ID 'dlOrders_ct104_ct103' in the page
vns955
Member
1 Points
13 Posts
Re: Bug with UpdatePanel
May 27, 2012 07:33 PM|LINK
How can I know this?
Thanks
Dino He - MS...
Star
8068 Points
1023 Posts
Microsoft
Re: Bug with UpdatePanel
May 28, 2012 08:53 AM|LINK
HI
If you want to modify the properties of an UpdatePanel on the server side during a partial postback, that UpdatePanel itself must be contained in another UpdatePanel's ContentTemplate.
So, for example, if you wanted to set an UpdatePanel's Visible property to false during a partial postback, that UpdatePanel would need to be in another UpdatePanel.
Typically, if you get this error, you should reconsider the design of your page. Treat the UpdatePanel more like a PlaceHolder than a Pane
http://chanderutd.blogspot.com/2008/05/sysinvalidoperationexception-could-not.html
http://forums.asp.net/p/1046285/1481792.aspx
Update panels are set to always postback. For dynamically generated items this will not work since they will not always be there. After resetting all of my update panels to updatemode=conditional, everything works like a charm.
Hope it helpful.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
Dino He - MS...
Star
8068 Points
1023 Posts
Microsoft
Re: Bug with UpdatePanel
May 28, 2012 08:58 AM|LINK
You can change the control's property ClientIDMode from "Inherit" to "Static" then you can get more useful ID.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
vns955
Member
1 Points
13 Posts
Re: Bug with UpdatePanel
May 28, 2012 01:54 PM|LINK
ClientIDMode property is "Static" already.
Dino He - MS...
Star
8068 Points
1023 Posts
Microsoft
Re: Bug with UpdatePanel
Jun 01, 2012 08:12 AM|LINK
So
Have you check my previous answer?
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
vns955
Member
1 Points
13 Posts
Re: Bug with UpdatePanel
Jun 02, 2012 11:41 AM|LINK
Yes. So, how can I fix it?