G
Guest
C# asp.net 2.0.
I'm creating an online survey. I'm making a string array that's holding the
variables of the answers made in the radiobuttonlists that i create manually.
I need to make a method that loops through all the radiobuttonlists and puts
the selected answers in the string array that i've created. I guess this is
relatively easy, but I haven't figured it out..here's the code that I have
for now:
protected void cmdSave_Click(object sender, EventArgs e)
{
string date = MakeMySqlDateTime();
int numberOfAnswers = 24; //Also the number of radiobuttonlists
string[] a = new string[numberOfAnswers]; //Variables to hold the
values until the insertion
//ALL THE RADIOBUTTONLISTS GOES HERE:
for (int i = 0; i <= numberOfAnswers; i++)
{
a = HERE I NEED TO ACCESS ALL THE RADIOBUTTONLISTS
}
a1 = rbl1.SelectedValue.ToString();
//-----END OF RADIOBUTTONLISTS----
Can someone please give me some hints and code to help me?
Thanks!
I'm creating an online survey. I'm making a string array that's holding the
variables of the answers made in the radiobuttonlists that i create manually.
I need to make a method that loops through all the radiobuttonlists and puts
the selected answers in the string array that i've created. I guess this is
relatively easy, but I haven't figured it out..here's the code that I have
for now:
protected void cmdSave_Click(object sender, EventArgs e)
{
string date = MakeMySqlDateTime();
int numberOfAnswers = 24; //Also the number of radiobuttonlists
string[] a = new string[numberOfAnswers]; //Variables to hold the
values until the insertion
//ALL THE RADIOBUTTONLISTS GOES HERE:
for (int i = 0; i <= numberOfAnswers; i++)
{
a = HERE I NEED TO ACCESS ALL THE RADIOBUTTONLISTS
}
a1 = rbl1.SelectedValue.ToString();
//-----END OF RADIOBUTTONLISTS----
Can someone please give me some hints and code to help me?
Thanks!