I need to validate 21 sets of radio buttons before submission to the server
for calculation and storage. Is it best to validate on the client side
using javascript or to validate on the server using the code behind
vbscript. It seems that natural to validate before submission.
If javascript is the best then how do I the variables. I noticed some
javascript that was dynamically created which looks like the following:
dgQuestions$_ctl7$_ctl0
Is this something similar to what I need to do?
Or are there alternate methods to access the variables. Below is the
datagrid control that I have defined. There are 4 radio buttons per
question in the datagrid. The radio buttons are databound as are the
questions.
Thank you so much!
<asp:datagrid ItemStyle-HorizontalAlign="Left"
ItemStyle-VerticalAlign="Middle"
BackImageUrl="images/keyboardwatermark.JPG" 1BackColor="lightsteelblue"
AlternatingItemStyle- BackColor="gainsboro"
id="dgSections"
runat="server" DataKeyField="QID" Width="90%">
<SelectedItemStyle-Font-Bold="True" ForeColor="White"
BackColor="LightCoral"></SelectedItemStyle>
<HeaderStyle Font-Size="8" Font-Bold="True" ForeColor="lightsteelblue"
BackColor="#333333"></HeaderStyle>
<FooterStyle ForeColor="Black" BackColor="#CCCC99"></FooterStyle>
<Columns>
<asp:TemplateColumn HeaderStyle-Font-Size="7"
HeaderStyle-HorizontalAlign="CENTER" HeaderText="Disagree------>Agree">
<ItemTemplate>
<asp:radiobuttonlist Font-Size="7" DataSource='<%# LoadNames() %>'
DataValueField="AID" DataTextField="" runat="server" ID="ddlAnswers"
RepeatColumns="4">
</asp:radiobuttonlist>
/ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Right" ForeColor="Black"
BackColor="White"></PagerStyle>
</asp:datagrid>