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. Reading the value of HTML radio buttons...

Reading the value of HTML radio buttons...

Scheduled Pinned Locked Moved ASP.NET
csharpquestionhtmlhelpworkspace
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.
  • T Offline
    T Offline
    Tony Archer
    wrote on last edited by
    #1

    Context: I'm writing a mini-app which allows people to look-up / enter language translations. Specifically code syntax. Ex. "I know that in VB I use vbCrLf to add a new line, how do I do the same thing in C#?" So the user puts "vbcrlf" in the "word" field and if there's a definition for it, it pops up. Environment: I'm running VB aspx pages. I have a form for submitting new definitions with a few .NET controls on it. When you submit the form it checks to see if the "word" they entered exists already. If it does it stops the user from entering the new word and displays the current translation(s). Problem: When I display the translations I add a HTML radio control to the begining of each translation and name them "Def" & DefID (so something like Def1, Def10, Def45). However, I cannot seem to read their values! Basically, after someone gets back the existing defs they can chose one of the radio buttons, they can then chose a seperate radio button "overwrite existing definition" and submit the form again. It's SUPPOSED to read the control they selected to know which existing definition to overwrite. But no data comes back. I have tried: Request.Form("Def" & DefID) Request.Form.Get("Def" & DefID) Request.Form.GetValues("Def" & DefID) And nothing returns a value. I'm used to standard ASP, so forgive the ignorance. --Tony Archer "I can build it good, fast and cheap. Pick any two."

    M 1 Reply Last reply
    0
    • T Tony Archer

      Context: I'm writing a mini-app which allows people to look-up / enter language translations. Specifically code syntax. Ex. "I know that in VB I use vbCrLf to add a new line, how do I do the same thing in C#?" So the user puts "vbcrlf" in the "word" field and if there's a definition for it, it pops up. Environment: I'm running VB aspx pages. I have a form for submitting new definitions with a few .NET controls on it. When you submit the form it checks to see if the "word" they entered exists already. If it does it stops the user from entering the new word and displays the current translation(s). Problem: When I display the translations I add a HTML radio control to the begining of each translation and name them "Def" & DefID (so something like Def1, Def10, Def45). However, I cannot seem to read their values! Basically, after someone gets back the existing defs they can chose one of the radio buttons, they can then chose a seperate radio button "overwrite existing definition" and submit the form again. It's SUPPOSED to read the control they selected to know which existing definition to overwrite. But no data comes back. I have tried: Request.Form("Def" & DefID) Request.Form.Get("Def" & DefID) Request.Form.GetValues("Def" & DefID) And nothing returns a value. I'm used to standard ASP, so forgive the ignorance. --Tony Archer "I can build it good, fast and cheap. Pick any two."

      M Offline
      M Offline
      Marcie Jones
      wrote on last edited by
      #2

      Tony, How are you displaying the translations? Some ASP.NET controls will prepend a prefix to your DefID, so check the View Source to be sure you're looking for the right thing. Marcie http://www.codeproject.com

      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