将enum绑定到dropdrownlist

 

Code

 

 

 

1            DropDownList1.DataSource = GetAllSex();
2            DropDownList1.DataTextField = "name";
3            DropDownList1.DataValueField = "value";
4            DropDownList1.DataBind();
posted @ 2009-05-05 13:29  zyip  阅读(321)  评论(4编辑  收藏  举报