2
如何在ASP.Net TreeView中設置圖像的大小?在ASP.Net TreeView中設置圖像的大小
我們試圖設置大小像這樣,但圖像顯示在全尺寸:
<asp:TreeView
runat="server"
DataSourceID="KnowledgeAcademySiteMap">
<RootNodeStyle ImageUrl="/Images/book.png" Height="32px" Width="32px" />
<ParentNodeStyle ImageUrl="/Images/book.png" Height="32px" Width="32px" />
<LeafNodeStyle ImageUrl="/Images/book.png" Height="32px" Width="32px" />
</asp:TreeView>
感謝您的回答。我用較小的尺寸製作了一張圖像副本。如果他們會添加我可以在標記中使用的寬度和高度屬性,那就太好了。 –
如果您安裝了[ImageResizer](http://imageresizing.net),則可以將?width = 32添加到圖像網址。 –