The ajax tabContainer and updatepanels can be a pain to work with in the VS designer.After several hours found a solution to work with them and think it could be interresting to share it.In our CMS there is several editpages with a lot of controls.Some pages is hard to understand so I wanted to use the ajax tabContainer to structure the data.When I did the setup of the page in the VS designer the problem started. First the tabContainer did not render at all in the designer, or did render for some time and then stoped.Most of the time the tabContainer shown the hated "Unknown server tag xxx" gray box.Ofcourse all controls I put inside the TabPanels did not rendered.To fix this problem I moved all my editcontrols out of the tabContainer.Then I can work with them in the designer as usual.I put PlaceHolder inside the tabContainer and use Server code to dynamicly move the editcontrols inside the correct TabPanels.I works great as long as you don't try to move an ajax updatepanel...Then this happends."Cannot unregister UpdatePanel with ID 'UpdatePanel1' since it was not registered with the ScriptManager"Ops. I have one updatepanel inside one of the TabPanels so I need to fix this.Now I started to feel a little frustrated.I started to google and found out that the updatepanel have problem with dynamic pages.It's when you move the updatepanel from one control to another control.There is a blog about this problem here so I wont go into the details.In the end it works as I wanted.I can work in the VS designer with all controls and the updatepanel is working fine inside the tabContainer.In the exampel code I have some tooltip javescript code and some other stuff that is not relevant for the problem.What I want to show is the setup of the editpage.I also want to show how I did it inside nested masterpages. You can download the sample code here.Hope you like it.
Tags:
Related posts
Comments
Pixcode is a software consulting company located in Trollhättan, Sweden.We hope you enjoy our blog.