Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-02-15
4
Medium Priority
?
427 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 2000 total points
ID: 34904619
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

916 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