I tried below this code...i getting this error "Cannot implicitly convert type 'void' to 'object'
//Data Access layer
protected void GetDealerType()
{
con.Open();
SqlCommand cmd = new SqlCommand("select DT_DealerTypeID,DT_TypeName from Tbl_DealerType", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
con.Close();
}
//codebehind
protected void BindDealerTypedropdown()
{
MyPageDA objDA = new MyPageDA();
ddl_DealerType.DataSource = objDA.GetDealerType();
ddl_DealerType.DataTextField = "DT_TypeName";
ddl_DealerType.DataValueField = "DT_DealerTypeID";
ddl_DealerTyp ...
Go to the complete details ...