I have a gridview on my page that is bound to a DataTable. One of the fields in the DataTable contains a Y or N to indicate the record is Active or Inactive. When this field is being editted, I want to have a dropdownlist with the options Active and Inactive for the use to choose from. The dropdownlist is not populated from a table. How do I bind my field from my DataTable to the dropdownlist? Here is my code:
<asp:DropDownList ID="DropDownList2" runat="server">
<asp:Label ID="Label1" runat="server" Text='<%# Bind("ActiveStatusFlag") %>'></asp:Label>
I want to have Inactive chosen in the dropdownlist if the ActiveStatusFlag is N and Active if the ActiveStatusFlag is Y. Any help is greatly appreciated.