增加线之间的差距是下拉

时间:2014-06-10 09:10:29

标签: asp.net dropdownbox

我有一个asp:下拉....

从sql DB填充...有很多选项,所以我想在每行之间创建一个小差距,说10px ......

继承DD代码

<td class="whiteCell" style="color:black">
Select a standard phrase to use in the comments section below:
<br />
<asp:DropDownList CssClass="whiteCell_DDP" ID="ddlPhrases" Width="600" AutoPostBack="true" OnSelectedIndexChanged="ddlPhrase_changed" runat="server" />
</td>

然后是cs文件......

// get the print phrases
var ph = from i in data.PRINTPHRASEs orderby i.PrintPhraseID ascending select i;

foreach (PRINTPHRASE p in ph)
{
string txt = p.PrintPhraseID.ToString() + ": " + p.Body;
ddlPhrases.Items.Add(new ListItem(txt, p.PrintPhraseID.ToString()));
}

效果很好,我可能会遗漏一些明显的东西......

由于

安德鲁

0 个答案:

没有答案