Showing posts with label maintain. Show all posts
Showing posts with label maintain. Show all posts

Wednesday, March 21, 2012

TabContainer doesnt maintain active tab after click on TreeView node

Hello,

I've got a small probleme with TabContainer and a treeview. When I click on a TreeView node, the TabContainer doesn't maintain its active tab after postback.

Here is a test page. To reproduce the problem, select the second tab, then click on any of the node inside the Tree.

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="test2.aspx.cs" Inherits="test2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> </head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="sm" runat="server"></asp:ScriptManager> <asp:TreeView ID="treeview" runat="server"> <Nodes> <asp:TreeNode Text="root" Value="root"> <asp:TreeNode Text="item1" Value="item1"></asp:TreeNode> <asp:TreeNode Text="item2" Value="item2"></asp:TreeNode> </asp:TreeNode> </Nodes> </asp:TreeView> <ajaxToolkit:TabContainer ID="container" runat="server"> <ajaxToolkit:TabPanel HeaderText="tab 1" runat="server" ID="tab1"></ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel HeaderText="tab 2" runat="server" ID="tab2"></ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> </div> </form></body></html>

It doesn't work with LinkButton postbacks, too, and probably with everything that uses __doPostBack() calls...