I am currently working on designing a layout that includes an ASP.NET TreeView
control on the left-hand side. However, I am facing an issue where the TreeView
renders as a div, causing a line break. I have tried using display:inline
, but it doesn't seem to work as expected:
<asp:TreeView ID="TreeView1" runat="server" style="display:inline;"
onselectednodechanged="TreeView1_SelectedNodeChanged"
ontreenodepopulate="TreeView1_TreeNodePopulate"
ontreenodeexpanded="TreeView1_TreeNodeExpanded">
<SelectedNodeStyle Font-Bold="True" Font-Underline="True" />
</asp:TreeView>
Here is my current markup:
<div id="mainDiv">
<div id="filters">
</div>
<div id="dMiddle">
<span id="sTreeView">
<asp:TreeView ID="TreeView1" runat="server" style="display:inline;"
onselectednodechanged="TreeView1_SelectedNodeChanged"
ontreenodepopulate="TreeView1_TreeNodePopulate"
ontreenodeexpanded="TreeView1_TreeNodeExpanded">
<SelectedNodeStyle Font-Bold="True" Font-Underline="True" />
</asp:TreeView>
</span>
<span id="sGrid">eventually a grid...</span>
</div>
</div>
The problem is that the TreeView
is causing a line break instead of staying within its designated span or div. Is there a workaround for this issue?