asp.net中dropdownlist如何绑定, 20
我的代码如下,哪有错呢,代码输出,说明没有绑定成功或者reader没成功connection.Open();SqlCommandcommand=newSqlCommand...
我的代码如下,哪有错呢,代码输出,说明没有绑定成功或者reader没成功
connection.Open();
SqlCommand command=new SqlCommand("select GovernmentAgency.GovName from GovernmentAgency,PublicFile where GovernmentAgency.GovCode=PublicFile.GovCode",connection);
SqlDataReader reader = command.ExecuteReader();
drop.DataSource= reader;
drop.DataBind() 展开
connection.Open();
SqlCommand command=new SqlCommand("select GovernmentAgency.GovName from GovernmentAgency,PublicFile where GovernmentAgency.GovCode=PublicFile.GovCode",connection);
SqlDataReader reader = command.ExecuteReader();
drop.DataSource= reader;
drop.DataBind() 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询