Actually my problem is a little bit different. In my query for binding the FormView I'm doing: ISNULL(Users.isMember, 0) AS isMember. However, I'm still having the same problem: MemberRadioButtonList has a selected value which is invalid because it doesn't exist in the list of items. If my list of items has only two value (0 and 1) and my query is making each NULL value equals to 0, wasn't this supposed to work? I ran the query in the SQL Server and it's working properly. What the problem could be?
Thanks again, Ana On Sep 11, 9:38 am, Ana <[email protected]> wrote: > Hi, > > I have a formview and, inside it, I have an ItemTemplate, an > InsertItemTemplate and an Edit ItemTemplate. In the InsertItemTemplate > and the EditItemTemplate, I have a RadioButtonList with two options > (Yes or No) and this list is bound with the information retrieved from > the Database. > The InsertTemplate is not a problem, because I'm specifying a default > value. But for the Edit ItemTemplate an error message is fired when > the value in the Database is null. My code is like this: > > ------------------------- > <tr> > <td align="right"> > <b> Member: </b> > </td> > <td align="left"> > <asp:RadioButtonList ID="MemberRadioButtonList" > runat="server" AutoPostBack="False" > SelectedValue='<%# Bind("isMember")%>'> > <asp:ListItem Text="Yes" Value="1"></asp:ListItem> > <asp:ListItem Text="No" Value="0" ></asp:ListItem> > </asp:RadioButtonList> > </td> > </tr> > ------------------------- > > How do I handle with the nulls in this case? > > Thanks a lot! > > Ana
