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. repeater control with radio button

repeater control with radio button

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
2 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.
  • K Offline
    K Offline
    kal13na13
    wrote on last edited by
    #1

    hi in my project asp.net with C# how i am suppose to bring radio button in the repeater control such that the user selects only one option having corresponding rows associated with that option any idea about this kal13na13

    M 1 Reply Last reply
    0
    • K kal13na13

      hi in my project asp.net with C# how i am suppose to bring radio button in the repeater control such that the user selects only one option having corresponding rows associated with that option any idea about this kal13na13

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, As you may already know that the repeater control implements the INamingContainer so at run time it automatically adds the prefix to its child controls. And as a result you cannot use the RadioButton/RadioButtonList controls to force the user to select only a row from the control. In this case, you can work around using the html radio input element without having the runat="server" stuff in the ItemTemplate, and specify the name for it. Doing so the repeater control does not change the name property, so all the radio buttons have the same name and the user is only able to select a row. You can wrap it in a custom control so that you can reuse it in other places, you can have a look at a demo from here[^].

      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