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. Non Item Selected on RadioButtonList

Non Item Selected on RadioButtonList

Scheduled Pinned Locked Moved ASP.NET
question
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.
  • A Offline
    A Offline
    Armando_Ramirez
    wrote on last edited by
    #1

    Hi I have a RadioButtonList Control and I dont have any Item selected. Is there an instruction that validates if you selected an Item or Not from this RadioButtonList Control??? I would expect something like this in VB: RadioButtonList1.AnyItemSelected=True Any ideas?? Thanx ¡¡

    G 1 Reply Last reply
    0
    • A Armando_Ramirez

      Hi I have a RadioButtonList Control and I dont have any Item selected. Is there an instruction that validates if you selected an Item or Not from this RadioButtonList Control??? I would expect something like this in VB: RadioButtonList1.AnyItemSelected=True Any ideas?? Thanx ¡¡

      G Offline
      G Offline
      Grapes R Fun
      wrote on last edited by
      #2

      Armando, you need to test your radio button list items using a foreach statement... Im more confortable with C#, if you are a VB person try to convert the below code to VB syntax protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { foreach (ListItem li in RadioButtonList1.Items) { if (li.Selected == true) { //execute some instruction } } } } Le me know if you are still confused Nila Fridley

      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