When stepping through the code, it fails on the "fUserSelect" line saying "Object reference not set to an instance of an object", but arrUsers is obviously populated so I'm at a loss here.
Any extra eyes on this would be wonderful!
Aspx set up:
<label for="fUser">User<span class="tip required">*</span></label>
<div class="group">
<span class="data dropdown">
<asp:DropDownList runat="server" ID="fUserSelect" EnableViewState="false"/>
</span>
</div>
CS:
List<KeyValuePair<string, string>> arrUsers = new List<KeyValuePair<string, string>>(){
new KeyValuePair<string, string>("1", "Test"),
new KeyValuePair<string, string>("2", "Test2")
};
fUserSelect.DataValueField = "Key";
fUserSelect.DataTextField = "Value";
fUserSelect.DataSource = arrUsers;
fUserSelect.SelectedIndex = 0;
fUserSelect.DataBind();