posts - 22, comments - 25, trackbacks - 0, articles - 3
  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理

公告

枚举是这样绑定到DropDownList的

Posted on 2007-04-25 15:12 Don 阅读(85) 评论(0) 编辑 收藏
foreach (int i in Enum.GetValues(typeof(ReportAuditStatus)))
{
     ddlAuditStatus.Items.Add(new ListItem(((ReportAuditStatus)i).ToString(), i.ToString()));
}