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. multi dimensional array in form

multi dimensional array in form

Scheduled Pinned Locked Moved ASP.NET
phpdata-structurestoolsjsonquestion
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.
  • D Offline
    D Offline
    dave2k
    wrote on last edited by
    #1

    i have a survey which involves multiple radiobuttons what i want to do is have a (multi dimensional?) array, so that each second dimension represnts a row of radiobuttons. The trouble is i don't know what to name the arrays as. Obviously for each row the names for the different radio buttons will be the same, meaning you can only select one. in php you could do it with a single array as you name each row of radio button differently: 1st row: name='array[0]' 2nd: name='array[1]' in asp it doesn't look like you can do it this way, because to create a similar array you'd do something like 1st row: name='array' 2nd name='array' then use split in the recipient script. This does not work however, because each radiobutton (on all rows) has the same name, and therefore when you click one all the rest on every row are unclicked.. thankyou

    G 1 Reply Last reply
    0
    • D dave2k

      i have a survey which involves multiple radiobuttons what i want to do is have a (multi dimensional?) array, so that each second dimension represnts a row of radiobuttons. The trouble is i don't know what to name the arrays as. Obviously for each row the names for the different radio buttons will be the same, meaning you can only select one. in php you could do it with a single array as you name each row of radio button differently: 1st row: name='array[0]' 2nd: name='array[1]' in asp it doesn't look like you can do it this way, because to create a similar array you'd do something like 1st row: name='array' 2nd name='array' then use split in the recipient script. This does not work however, because each radiobutton (on all rows) has the same name, and therefore when you click one all the rest on every row are unclicked.. thankyou

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Why would you use a multi dimensional array for this? As each row of radio buttons only can have one button selected, you only need one value to represent each row. There is no difference in the html used by PHP and ASP.NET. (Actually they don't even care if it is html code or not.) You can name your radio buttons exactly the same using ASP.NET as you did using PHP. --- b { font-weight: normal; }

      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