string ss_sql = " select isnull(genre_id,0) genre_id from ddw_member_info where member_id=' " + this .Page.Session[ " member_id " ].ToString() + " ' " ; string default_selected = ddw.fn_execlquerysql(ss_sql); // 1 this .DropDownList1.DataSource = ddw.dataset.Tables[ 0 ].DefaultView; this .DropDownList1.DataTextField = " genre_desc " ; this .DropDownList1.DataValueField = " genre_id " ; this .DropDownList1.DataBind(); this .DropDownList1.Items.Add( new ListItem( " 请选择 " , " 0 " )); this .DropDownList1.Items.FindByValue(default_selected).Selected = true ; // 绑定 转载于:https://www.cnblogs.com/yamajia/archive/2006/10/26/540906.html