+1  A: 

(untested)

this.ddlReasonsWhy.DataSource = reasonsList.getReasons;
this.ddlReasonsWhy.DataBind();
edosoft
tried that - gets a null reference exception
John M
A: 

Just a thought, but how about:

this.ddlReasonsWhy.Items.Add(reasonsList.getReasons().Select(r => new ListItem(r)));
David Kemp
+3  A: 

-- Edit:

I've noticed you specifically wanted to bind to an array. I don't believe that is possible (may be wrong); I leave my example below of how to do it for a custom class, perhaps it is of use, perhaps not. Hopefully someone else answers you more directly.

-- Old:

Certainly it is, like so:

ddlList.DataSource     = yourDataSource;
ddlList.DataTextField  = "DisplayProperty";
ddlList.DataValueField = "PropertyForValue";
ddlList.DataBind();

But note, in your example you've not posted the class, you've posted a method. In the example about 'yourDataSource' should be something like:

List<YourObjects> yourDataSource = new List<YourObjects>();
Noon Silk
thanks - definitely got me in the right direction.
John M
+2  A: 

Use ListItem instead of string and Addrange for Add

edit: getReasons is not a variable so use getReasons()

ASPXPAGE

<asp:DropDownList ID="ddlReasonsWhy" runat="server"></asp:DropDownList>

ASPX Code Behind

protected void Page_Load(object sender, EventArgs e)
{
    //instantiate custom class
    Class1 reasonsList = new Class1();
   //populate reasons list
   this.ddlReasonsWhy.Items.AddRange(reasonsList.getReasons());
}

Custom Class

public ListItem[] getReasons()
    {
        ListItem[] Reasons;
        Reasons[0] = "test";
        Reasons[1] = "test2";
        Reasons[2] = "test3";

        return Reasons;
    }
Ahmet Kakıcı
thanks - this was very helpful - please see my update1 for the correct class syntax.
John M