Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to get checked radio button value in Radiobuttonlist

How to get checked radio button value in Radiobuttonlist

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadmintutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chakran
    wrote on last edited by
    #1

    Hi, am adding listitems to Radiobuttonlist dynamically. but when I click on button I didn't get selected item value. How to get selected radion button value during runtime(when click button). am using asp.net 2.0 and C#. pls see the below code. <asp:Panel ID="panelRecharge" runat="server"> <asp:RadioButtonList ID="rdlRechargeOptions" runat="server" > </asp:RadioButtonList> </asp:Panel> private void LoadRechargeOptions(VerifyPromotionResponse response) { ListItem li; if (response.ChargeAmount1 >0) { li = new ListItem(); li.Attributes.Clear(); li.Value = response.ChargeAmount1.ToString(); li.Text = response.CurrencyCode + response.ChargeAmount1.ToString(); rdlRechargeOptions.Items.Add(li); rdlRechargeOptions.RepeatDirection = RepeatDirection.Horizontal; } Thanks

    L 1 Reply Last reply
    0
    • C chakran

      Hi, am adding listitems to Radiobuttonlist dynamically. but when I click on button I didn't get selected item value. How to get selected radion button value during runtime(when click button). am using asp.net 2.0 and C#. pls see the below code. <asp:Panel ID="panelRecharge" runat="server"> <asp:RadioButtonList ID="rdlRechargeOptions" runat="server" > </asp:RadioButtonList> </asp:Panel> private void LoadRechargeOptions(VerifyPromotionResponse response) { ListItem li; if (response.ChargeAmount1 >0) { li = new ListItem(); li.Attributes.Clear(); li.Value = response.ChargeAmount1.ToString(); li.Text = response.CurrencyCode + response.ChargeAmount1.ToString(); rdlRechargeOptions.Items.Add(li); rdlRechargeOptions.RepeatDirection = RepeatDirection.Horizontal; } Thanks

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      chakran wrote:

      but when I click on button I didn't get selected item value.

      What did you get? And you did not post the click handler code :confused:

      led mike

      C 1 Reply Last reply
      0
      • L led mike

        chakran wrote:

        but when I click on button I didn't get selected item value.

        What did you get? And you did not post the click handler code :confused:

        led mike

        C Offline
        C Offline
        chakran
        wrote on last edited by
        #3

        Hi, in my page there are two button. One is Validate and second is Next buttons. when I click Validate am calling LoadRechargeOptions() method. in this one am adding conrols dynamically to Radiobuttonlist. it is showing Radion buttons. when I selected radio button and click Next button here the selected radion button value is not coming... is there any solution..? Thanks.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups