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