Link to home
Start Free TrialLog in
Avatar of minglelinch
minglelinch

asked on

How to get selected radio buton from C#

I have a radiobuton defined as -

<asp:Panel ID="Panel6" GroupingText="Search Type:" runat="server" Width="440px">              
     <asp:RadioButtonList ID="rdLineNo" runat="server" Width="440px" AutoPostBack="true"
         RepeatDirection="Vertical" onselectedindexchanged="rdLineNo_SelectedIndexChanged">                      
              <asp:ListItem Value="line">By No. </asp:ListItem>
              <asp:ListItem Value="other">By Other </asp:ListItem>
      </asp:RadioButtonList>
</asp:Panel>

In the C# function
    protected void RadioLineNo_SelectedIndexChanged(object sender, EventArgs e)
I need to get the selected radiobuton value. How can I get it?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of CtrlAltDl
CtrlAltDl
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of minglelinch
minglelinch

ASKER

Both are working well. Thanks for both great answers.