I have a list and I am trying to add the data to the ddl. It returns data, (namespace.List). But there is something I am missing… any suggestions?
public List<getBranch> Branch { get; private set; }
...
getBranch(user.code);
ddlOption.DataSource = Branch;
ddlOption.DataBind();
All you’re missing is to tell the dropdown what property of getBranch to show as text and what to use as value:
ok, here’s how the code should look like (i think):
your Branch class properties:
…