Combobox值自定义(不通过数据库)-LMLPHP

前台

<ext:ComboBox ID="cmbYear" runat="server"/>

.aspx.cs

int year = DateTime.Now.Year + 4;
while (year >= 2012)
{
cmbYear.Items.Add(new Coolite.Ext.Web.ListItem(year, year.ToString()));
year--;
}

05-11 11:05