Solved

It possible to give a radiobutton two values

Posted on 2008-10-01
4
240 Views
Last Modified: 2013-11-07
Hi,
I have a radiobutton list which I populate by a XML file into a dataset then populate the radiobutton list from the dataset

rbtnList. DataTextField = "text"
rbtnList.DataValueField = "Value"

but I want to add a third column and call it later Is this possible and if so how would I do it.
0
Comment
Question by:niall29
  • 2
  • 2
4 Comments
 
LVL 20

Expert Comment

by:informaniac
ID: 22613434
Not possible.

Why exactly are you looking for a third column?
0
 

Author Comment

by:niall29
ID: 22613465
I have a text field which obviously is the display on the radio button list
I have a value field which is an int which is saved to the Db as what type of letter was sent
but now I want another value to tell it where to get the necessary data
0
 
LVL 20

Accepted Solution

by:
informaniac earned 50 total points
ID: 22613485
when u r fetching the data

select valueFieldCol1 + '$' + valueFieldCol2 as valueField,textfield from tblName

Now when u r sending to the d/b u could something like this

for int field send rbList.SelectedValue.Split('$')[0];

and for the other send rbList.SelectedValue.Split('$')[1];

if u r using xml then $ won't work, replace it something else
0
 

Author Closing Comment

by:niall29
ID: 31501930
I like that idea, sometimes the answer is staring you in the face.
Thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question