1
如何從中繼器控制實際值到列表框控件,爲此我寫下面的代碼,但我得到的值system.data.datarowview ...system.data.datarowview在列表框c#asp.net
protected void BindContriesDropDownList()
{
SqlCommand objSqlCommand = null;
strSQL = @"SELECT Country_Name FROM Country_Master";
objSqlCommand = new SqlCommand(strSQL, objSqlDbComm.SqlConnectionObject);
objSqlCommand.Parameters.AddWithValue("@paramCountry_Name", ddlSelectCountryName.Text);
DataTable objDataTable = objSqlDbComm.ExecuteDataTable(objSqlCommand);
ddlSelectCountryName.DataSource = objDataTable;
ddlSelectCountryName.DataBind();
}