Click here to Skip to main content
15,917,456 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
validations are not working in my asp page why it is? am not getting please help me .
my code is as below
ASP.NET
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
                                    <tr>
                                        <td align="right">First Name: </td><td align="left">
                                            <Rad:RadTextBox ID="txtFirstName" Text='<%# Eval( "FirstName") %>'  runat="server">
                                            
                                            
                                            <asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="txtFirstName" ErrorMessage="*" ValidationGroup="vga" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">Last Name: </td><td align="left">
                                            <Rad:RadTextBox ID="txtLastName" Text='<%# Eval( "LastName") %>'  runat="server">
                                            
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtLastName" ErrorMessage="*" ValidationGroup="vga" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">Contact Number: </td><td align="left">
                                            <Rad:RadTextBox ID="txtContactNo" Text='<%# Eval( "ContactNo") %>'  runat="server">
                                            
                                             <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtContactNo" ErrorMessage="*" ValidationGroup="vga" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">EmailID: </td><td align="left">
                                            <Rad:RadTextBox ID="txtEmailID" Text='<%# Eval( "EmailID") %>'  runat="server">
                                            
                                            
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtEmailID" ErrorMessage="*" ValidationGroup="vga" />
                                            <%--<asp:RegularExpressionValidator ID="REFV" runat="server" ControlToValidate="txtEmailID"  ErrorMessage="Enter in correct format" ValidationGroup="vga" Display="Static" />--%>
                                        </td>
                                    </tr>
                                </table>
                                <table style="width: 100%">
                                    <tr>
                                        <td align="center" colspan="2">
                                            <Rad:RadButton ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                 runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' CausesValidation="true">
                                            
                                             
                                            <Rad:RadButton ID="Button2" Text="Cancel"  runat="server" CausesValidation="False"
                                                CommandName="Cancel">
                                            
                                        </td>
                                    </tr>
                                </table>
Posted
Updated 24-Aug-12 23:15pm
v2
Comments
Christian Graus 25-Aug-12 5:15am    
IT's an ASP.NET page. ASP is something different
Christian Graus 25-Aug-12 5:33am    
Are you sure the Rad controls support validation like this and don't write their own validators ?

All of you validation controls have ValidationGroup="vga" assigned to it however none of you rad controls have a ValidationGroup.

I would maybe start by fixing that problem (either take out the validationgroup from validation controls or add a validationgroup to your radcontrols) and see what happens next.
 
Share this answer
 
I just think, posting such issues about a 3rd party control would be more useful at their respective forums. Try here:TELERIK Forum[^]

I had found that specific questions related to 3rd party is answered more quickly and accurately at respective forums.
 
Share this answer
 
Comments
Wendelius 25-Aug-12 14:55pm    
Quite true, 5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900