Hi
Just wondering is it possible to access controls from diff update panels
I have a treeview in 1 updatepanel, upon selecting a node in the tree I want to display a panel outside the updatepanel, possibly in another updatepanel
confusing? maybe
Dim panel1 As Panel = CType(Me.UpdatePanel1.FindControl("panel10"), Panel)
Panel1.Visible = True
It definately finds the contro, but will not mae it visible
thoughts ?
Hi!
Are you calling UpdatePanel1.Update() after you set the visible property to true? If you are missing that the Panel will be "visible" but not "showing" as visible.
Also, just a doubt: Why you need to use FindControl to find controls inside UpdatePanels? They aren't NamingContainers, thus you should be able to call them directly from the page.
Regards,
Juan
One more note: if you're talking about using a TreeView, note that the TreeView control isn't compatible with partial rendering (so it can't get updated inside an UpdatePanel). Seehttp://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx#UpdatePanelCompatibleControls.
A good way to think about the UpdatePanel is that it doesn't really change the way postbacks work. So if you can do what you want to with a regular postback, then it should just be a matter of wrapping the write regions of the page in UpdatePanels and setting up the triggers (or calling UpdatePanel1.Update() in the code-behind) to make sure those regions of the page get updated when appropriate during the async postback. My advice would be to get this working how you want with regular postbacks, then add UpdatePanels (which will by default all update on every async postback), and finally optimize by setting UpdateMode="Conditional" and setting up your triggers, so you selectively update the parts of the page that you need to.
thanks guys , some great advice there
UpdatePanel1.Update() was the key here
Steve Marx:
One more note: if you're talking about using a TreeView, note that the TreeView control isn't compatible with partial rendering (so it can't get updated inside an UpdatePanel). Seehttp://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx#UpdatePanelCompatibleControls.
Steve , Is this something that will be fixed in future AJAX releases
I also have some file upload controls on the page that I really need to have there
No comments:
Post a Comment