Solved

i have to store radiobutton event to string array , but how can i do this ?

Posted on 2011-02-15
4
402 Views
Last Modified: 2012-05-11
i have attached one snapshot . in this i highlited the portion .

now when i click on any one radio button out of 4 and then click on save and view
then it will save the 1c as string ("1c") in my string array, it's for only 1 question

now i have to do it for 3 questions , but how can i do this ?

please refer the attached snapshot ....
16-02-2011-12-33-58-PM.jpg
0
Comment
Question by:Parth48
  • 2
4 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 34904229
Do you want to store it into a datase, textfile, memory ... ?

You can store it easily into a string, separated by a fe ";"

String YourString = "1c;2b";

When you need the values sepated, you can use the split-function

String[] Values = YourString.Split(";");
0
 

Author Comment

by:Parth48
ID: 34904559
in my coding , now i want to store radiobutton checked is true then store it in stringoptions array otherwise not means

stringoptions[0] = "1a"
stringoptions[0] = "2c"
stringoptions[0] = "3b"

how can i do this ?

please refer the attached file ...

Question-Assistant.Designer.cs
Question-Assistant.cs
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 34904580
If I understand it correctly: you want to store each answer into an array, called stringOptions.

So I think you'll will perform this:
' This will hold the choosen value of question 1
stringoptions[0] = "1a";
' This will hold the choosen value of question 2
stringoptions[1] = "2c";
' This will hold the choosen value of question 3 (for example not yet selected)
stringoptions[1] = "";
' This will hold the choosen value of question 4
stringoptions[1] = "4d";


0
 
LVL 11

Accepted Solution

by:
SAMIR BHOGAYTA earned 500 total points
ID: 34904619
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now