Parth48
asked on
i have to store radiobutton event to string array , but how can i do this ?
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
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
ASKER
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
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
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";
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";
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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(";");