Sorry for the delayed response - I have been on vacation.
As long as those nodes you would like to expand do not need to be navigated to, and the web.sitemap does not have a URL attribute set for the nodes you wish to have this expand happen on you should be fine with the below code (sorry for the bad formatting):
HTH
JD
web.sitemap
<
siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="">
<siteMapNode title="Home">
<siteMapNode url="Default2.aspx" title="Home2">
</siteMapNode>
</siteMapNode>
<siteMapNode title="About Us">
<siteMapNode url="AboutUs2.aspx" title="About Us2">
</siteMapNode>
</siteMapNode>
</siteMapNode>
</siteMap>
aspx page
<%
@ Page Language="C#" %>
<html>
<head runat="server">
</head>
<body>
<form id="form1" runat="server">
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" ExpandDepth="0">
<DataBindings>
<asp:TreeNodeBinding DataMember="SiteMapNode" NavigateUrlField="Url" SelectAction="Expand" TextField="Title" />
</DataBindings>
</asp:TreeView>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
</form>
</body>
</html>
This posting is provided "AS IS" with no warranties, and confers no rights.
We Are Hiring