Check if you using multiple UpdatePanels on your page and control of one UpdatePanel is trying access control of another UpdatePanel.
I could fix same issue after reading following article: http://dotnetspidor.blogspot.com/2009/02/sysinvalidoperationexceptio-in.html?showComment=1260502310856_AIe9_BE1nWk7xsQRMFukkVtzruOWSf8SHFdwxS_ofZCp49qBgbvNCAkSOG5lUjdgqpTXX2-i0gK183oSKHRRZjyK38vr6RyaoX8AMWSMm6emgCbGSLPymFeoMO6fsRfywBEuF5pRRVXeEpvB-DicKrvQybiyFRKCVkfgE6TTVgJuTfpZIAUu-DJO8jYk9YPoO2G2AooUdUu_sfvtDKqZqcGy7Md0pHeOLM1axXddxEfEb-N9O09U9F5RGGbjp9MN70KssypbBJqg#c320158172864907914 On Nov 5, 6:44 am, Felipe Teixeira <[email protected]> wrote: > Whenever you use a control that is visible to the code behind (by setting * > runat=server*), the IDs of its child server controls will change. to keep > track of it you should refer to a control by its ClientID. > > http://msdn.microsoft.com/en-us/library/system.web.ui.control.clienti...http://msdn.microsoft.com/en-us/library/3hc29e2a.aspx > > Hope it helps. > > Felipe Teixeira > Microsoft Certified Technology Specialist - MCTS - Microsoft .Net Framework > 2.0 > Application Development Foundation MS > Web -based Client Development > Mobile: +55 (11) 8021-6457 > [email protected]http://iguessimnotcrazy.wordpress.com/ > > 2009/11/5 Paulo Roberto Pellucci <[email protected]> > > > > > Ana, is that div really necessary then? I can't see no point on still > > having it if its causing the problem. > > > If you really have to use it, well then, we will try to fix the problem. > > On Thu, Nov 5, 2009 at 6:30 AM, Processor Devil <[email protected] > > > wrote: > > >> Your div has an ID, maybe try to look for your fields though that. > > >> 2009/11/4 Ana <[email protected]> > > >>> One more coment about the problem: my previous version didn't have the > >>> <div> (Only the UpdatePanel and evrything inside it) and was working > >>> ok. When I included the UpdatePanel inside the <div> was when I > >>> started having this problem. > > >>> On Nov 4, 11:59 am, Ana <[email protected]> wrote: > >>> > Hi, > > >>> > In the page I'm developing I have the following structure: > > >>> > <div id="myDiv" runat="server"> > >>> > <asp:UpdatePanel> > >>> > <ContentTemplate> > >>> > <asp:GridView Id=myGridView ...> > >>> > <Columns> > >>> > <TemplateField HeaderText="Header"> > >>> > <ItemTemplate> > >>> > ... > >>> > </ItemTemplate> > >>> > <InsertItemTemplate> > >>> > ... > >>> > </InsertItemTemplate> > >>> > <EditItemTemplate> > >>> > ... > >>> > </EditItemTemplate> > >>> > <FooterTemplate> > >>> > ... > >>> > </FooterTemplate> > >>> > </TemplateField> > >>> > </Columns> > >>> > </asp:GridView> > >>> > </ContentTempate> > >>> > </asp:UpdatePanel> > >>> > </div> > > >>> > Inside the GridView, in one of the <EditTemplate> and in one of the > >>> > <InsertItemTemplate>, I have the following line: > >>> > OnClientClick="javascript:setTimeout('__doPostBack(\'< > >>> > %=someButton.ClientID%>',\'\')', 0)" associated to a LinkButton > >>> > (UpdateButton and InsertButton). > > >>> > This GridView is being shown when the user clicks on a linkButton > >>> > (DetailsLinkButton) in another GridView (the second GridView show the > >>> > details for the record chosen in the first one). > > >>> > I'm having this error message when I click on the DetailsLinkButton: > >>> > Could not find UpdatePanel with ID 'ctl00 main Copy UpdatePanel'. If > >>> > it is being updated dynamically then it must be inside another > >>> > UpdatePanel. > > >>> > I tried run the page after removing this two callings to the > >>> > javascript __postBack method but I still have the same problem (after > >>> > removing this two callings to the __postBack method, the only call to > >>> > a javascript in my Page is to confirm the deletion of a record). > > >>> > Have anyone ever had this problem? What is happening? All help is > >>> > welcome! > > >>> > Thanks, > > >>> > Ana > > > -- > > Atenciosamente, > > Paulo Roberto S. Pellucci- Hide quoted text - > > - Show quoted text -
