Garima Bansal

Garima Bansal

  • 1.1k
  • 668
  • 38.4k

radiobutton list only store null value in database

Jan 3 2023 5:18 AM

I am using radiobutton list with 3 list item, after select one list item its only take null value in database 

<asp:RadioButtonList ID="rdltype" runat="server" DataTextField="Type" DataValueField="Type" RepeatDirection="Horizontal" CssClass="spaced"
                Style="font-weight: 700" >
                <asp:ListItem> ls1</asp:ListItem>
                <asp:ListItem>ls2</asp:ListItem>
                <asp:ListItem>ls3</asp:ListItem>
                
            </asp:RadioButtonList>

 

cmd.Parameters.AddWithValue("@FarmerType", rdltype.SelectedItem.Text);

 

 


Answers (4)