Вы можете добавить RootNodeStyle
для дерева:
/* Styles: put this at style section or at your .css file */
.rootNodeLinkStyle a:link
{
color: Red;
}
.rootNodeLinkStyle a:hover
{
color: pink;
text-decoration:underline;
}
В .aspx: добавьте класс css к RootNodeStyle
, как показано ниже:
<asp:TreeView ID="trvPILDeepSearch" runat="server" ImageSet="Simple" BackColor="#F8F8F8" BorderWidth="5px" BorderColor="#F8F8F8" LeafNodeStyle-CssClass="leafnode" Width="600px" >
<DataBindings>
<asp:TreeNodeBinding DataMember="Parent" TextField="TEXT" SelectAction="None" />
<asp:TreeNodeBinding DataMember="Child" TextField="TEXT" SelectAction="None" />
</DataBindings>
<RootNodeStyle CssClass="rootNodeLinkStyle" />
</asp:TreeView>