0
我的列表框如下: -問題aspx頁面上添加屬性爲Asp ListBox的listItems中的代碼背後
<asp:ListBox ID="ddlItems" runat="server" Style="padding: 2px; width: 210px; height:200px;">
</asp:ListBox>
我添加背景圖片到我的列表項爲
跟隨後面的代碼及其完美的工作: -
myListItem.Attributes.Add("style", "background-image:url(" + "'www.mysite.com/" +
"images/Gradient/" + ds.Tables[0].Rows[iGroups]
["Backgroundimage"].ToString() + "');");
現在我已經嘗試了很多事情,但我不能讓做
列表項的字體加粗和白色。此外
我怎麼能增加這些列表項
,因此字體大小的高度?
我曾嘗試以下,但它的不工作: -
myListItem.Attributes.Add("ForeColor", "White");
myListItem.Attributes.Add("style", "font-weight:bold");
你是對的!這是覆蓋。謝謝! :D – Infinity 2011-04-15 08:33:06
很高興幫助:) – Robert 2011-04-15 08:33:46