envisiondesign
Programmer
I am starting to learn C# along with ASP.NET. I am a PHP programmer trying to stretch out.
I have a survey that is 10 questions with 5 possible answers that are radio buttons. I am using this to limit the users possible choice to one per question.
<asp:RadioButton id="RadioButton1" runat="server" value="0" groupname="q1"></asp:RadioButton>
<asp:RadioButton id="RadioButton2" runat="server" value="0" groupname="q1"></asp:RadioButton>
<asp:RadioButton id="RadioButton3" runat="server" value="0" groupname="q1"></asp:RadioButton>
<asp:RadioButton id="RadioButton4" runat="server" value="0" groupname="q1"></asp:RadioButton>
<asp:RadioButton id="RadioButton5" runat="server" value="0" groupname="q1"></asp:RadioButton>
And there are obviously 10 separate Group Names.
My question is how do I process this and do I need to change the radiobutton syntax to...
<asp:RadioButton id="RadioButton[1]" runat="server" value="0" groupname="q1"></asp:RadioButton>
With PHP I would do this
$q = $_POST['radiobutton'];
$score = array_sum($q);
Any help is great.
If you choose not to decide you still have made a choice; choose life.
I have a survey that is 10 questions with 5 possible answers that are radio buttons. I am using this to limit the users possible choice to one per question.
<asp:RadioButton id="RadioButton1" runat="server" value="0" groupname="q1"></asp:RadioButton>
<asp:RadioButton id="RadioButton2" runat="server" value="0" groupname="q1"></asp:RadioButton>
<asp:RadioButton id="RadioButton3" runat="server" value="0" groupname="q1"></asp:RadioButton>
<asp:RadioButton id="RadioButton4" runat="server" value="0" groupname="q1"></asp:RadioButton>
<asp:RadioButton id="RadioButton5" runat="server" value="0" groupname="q1"></asp:RadioButton>
And there are obviously 10 separate Group Names.
My question is how do I process this and do I need to change the radiobutton syntax to...
<asp:RadioButton id="RadioButton[1]" runat="server" value="0" groupname="q1"></asp:RadioButton>
With PHP I would do this
$q = $_POST['radiobutton'];
$score = array_sum($q);
Any help is great.
If you choose not to decide you still have made a choice; choose life.