I would like to validate columns in an asp:Gridview but am unsure how to do so as all the tutorials I have found show a previous version on Microsoft Visual Studio (I am using 2010).
How do I validate each column of the Gridview?
Thanks
This is the code of my Gridview generated by visual studio.
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
DataKeyNames="registrationNo" DataSourceID="SqlDataSource3"
onselectedindexchanged="GridView2_SelectedIndexChanged">
<Columns>
<asp:BoundField DataField="fullName" HeaderText="fullName"
SortExpression="fullName" />
<asp:BoundField DataField="address" HeaderText="address"
SortExpression="address" />
<asp:BoundField DataField="work" HeaderText="work"
SortExpression="work" />
<asp:BoundField DataField="home" HeaderText="home" SortExpression="home" />
<asp:BoundField DataField="mobile" HeaderText="mobile"
SortExpression="mobile" />
<asp:BoundField DataField="registrationNo" HeaderText="registrationNo"
InsertVisible="False" ReadOnly="True" SortExpression="registrationNo" />
<asp:ButtonField ButtonType="Button" CommandName="Edit" HeaderText="Edit"
ShowHeader="True" Text="Edit" />
<asp:ButtonField ButtonType="Button" CommandName="Update" HeaderText="Update"
ShowHeader="True" Text="Update" />
<asp:ButtonField ButtonType="Button" CommandName="Delete" HeaderText="Delete"
ShowHeader="True" Text="Delete" />
</Columns>
<HeaderStyle BorderColor="#33CC33" />
<RowStyle BorderStyle="Double" Font-Names="Monotype Corsiva" />
</asp:GridView>