Just starting out, shocker right... Anyway, I built a simple master page with just one content place holder, a table and only one control on it, a tabcontainer in the center row/center cell. I then built a content page and put a single treeview control in it. I am trying to keep things simple as I learn here.
Now I'll add here that I had also done this on a single .aspx page, the treeview and tab container, and got the same result...
Whenever anything on the treeview is clicked, whether it is the first time to expand it, or another time clicking one of the node, which does nothing yet, the acitve tab is changed to the second tab. In this version with the master page I have only two, simple to learn right. On the .aspx version I was working withh just to understand the workings of each of the controls I had 4 tabs I think, and it changed to the 3rd tab.
I have searched both here and elsewhere (via google) the MSDN etc. and am having no luck understanding what I have done. My understanding is I'd need to code to get some interaction like that, but as you will see below I haven't...well at least not that I can see.
TIA for the help. And hey if you notice anything unrelated yet equally newbie stupid please advise.
Regards,
Joe
MASTER PAGE CODE
<head runat="server">
<title>Untitled Page</title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style1
{
width: 100%;
}
</style>
</head>
<body background="images/bgetc/5x2000B2W.jpg" bgcolor="White"
style="font-family: Calibri" scroll="auto">
<form id="form1" runat="server">
<div>
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</cc1:ToolkitScriptManager>
<br />
<br />
<br />
</div>
<table bgcolor="White" class="style1">
<tr>
<td colspan="3">
<br />
</td>
</tr>
<tr height="500">
<td width="100" height="25" valign="top">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
<p>
</p>
</asp:ContentPlaceHolder>
</td>
<td valign="top">
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1"
Width="658px">
<cc1:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
</cc1:TabPanel>
</cc1:TabContainer>
</td>
<td width="100" height="600">
</td>
</tr>
<tr>
<td align="center" colspan="3">
</td>
</tr>
</table>
</form>
</body>
</html>
ASPX content page CODE
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:TreeView runat="server" ImageSet="Msdn" NodeIndent="10" ID="TreeView1"
OnTreeNodePopulate="PopulateNode" Height="40px">
<HoverNodeStyle BackColor="#CCCCCC" BorderColor="#888888" BorderStyle="Solid" Font-Underline="True">
</HoverNodeStyle>
<Nodes>
<asp:TreeNode PopulateOnDemand="True" Text="Company" Value="Company"
Expanded="False"></asp:TreeNode>
</Nodes>
<NodeStyle HorizontalPadding="5px" NodeSpacing="1px" VerticalPadding="2px" Font-Names="Verdana" Font-Size="8pt" ForeColor="Black">
</NodeStyle>
<ParentNodeStyle Font-Bold="False"></ParentNodeStyle>
<SelectedNodeStyle HorizontalPadding="3px" VerticalPadding="1px" BackColor="White" BorderColor="#888888" BorderWidth="1px" BorderStyle="Solid" Font-Underline="False">
</SelectedNodeStyle>
</asp:TreeView>
<script language="VB" runat="server">
Sub GetCompanies(ByVal node As TreeNode)
Dim companies As CompanyList = CompaniesDB.GetCompanies()
Dim c As Company
For Each c In companies
Dim newNode As TreeNode = New TreeNode(c.Name)
newNode.SelectAction = TreeNodeSelectAction.Expand
newNode.PopulateOnDemand = True
node.ChildNodes.Add(newNode)
Next
End Sub
Sub PopulateNode(ByVal source As Object, ByVal e As TreeNodeEventArgs)
Select Case e.Node.Depth
Case 0
GetCompanies(e.Node)
Case 1
'GetCompanies(e.Node)
End Select
End Sub
</script>
</asp:Content>