验证在我的asp页中没有被唤醒,为什么呢? [英] Validatiions are not woking in my asp page why it is?

查看:49
本文介绍了验证在我的asp页中没有被唤醒,为什么呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

验证在我的asp页中为什么不起作用,为什么呢?没有得到,请帮助我.
我的代码如下

 <      id   ="    单元格间距  ="     cellpadding   ="    宽度  ="    边框  ="  <   tr  > 
                                        <   td     ="  右" <  >   td  对齐  ="  > 
                                            <   Rad:RadTextBox     ID   ="  文本  <%#Eval("  )%>'      runat   ="  > 
                                            
                                            
                                            <   asp:RequiredFieldValidator     ID   ="   runat   服务器"  ControlToValidate    txt名字"  ErrorMessage    *"  ValidationGroup   ="    /  > 
                                        <  /td  > 
                                    <  /tr  > 
                                    <   tr  > 
                                        <   td     ="  右" <  >   td  对齐  ="  > 
                                            <   Rad:RadTextBox     ID   ="  文本  <%#Eval("  )%>'      runat   ="  >> 
                                            
                                        <   asp:RequiredFieldValidator     ID   ="   runat   服务器"  ControlToValidate    txtLastName"  ErrorMessage    *"  ValidationGroup   ="    / > 
                                        <  /td  > 
                                    <  /tr  > 
                                    <   tr  > 
                                        <   td     ="  右" <  >   td  对齐  ="  > 
                                            <   Rad:RadTextBox     ID   ="  文本  <%#Eval("  )%>'      runat   ="  > 
                                            
                                             <   asp:RequiredFieldValidator     ID   ="   runat   服务器"  ControlToValidate    txtContactNo"  ErrorMessage    *"  ValidationGroup   ="    / > 
                                        <  /td  > 
                                    <  /tr  > 
                                    <   tr  > 
                                        <   td     ="  右" <  >   td  对齐  ="  > 
                                            <   Rad:RadTextBox     ID   ="  文本  <%#Eval("  )%>'      runat   ="  > 
                                            
                                            
                                            <   asp:RequiredFieldValidator     ID   ="   runat   服务器"  ControlToValidate    txtEmailID"  ErrorMessage    *"  ValidationGroup   ="    / > 
                                            <%-  < asp:RegularExpressionValidator ID ="REFV" runat ="server" ControlToValidate = "txtEmailID" ErrorMessage =以正确的格式输入" ValidationGroup ="vga" Display ="Static"/>  -%>  
                                        <  /td  > 
                                    <  /tr  > 
                                <  /table  > 
                                <      ="  宽度:100%" <   tr  > 
                                        <   td     ="   center"  colspan    2" > 
                                            <   Rad:RadButton     ID   ="  文本  <%#(容器为GridEditFormInsertItem)? " :" 更新"%>' 
                     span>                                                                        runat   ="   CommandName   " :" 更新"%>'  CausesValidation   ="  > 
                                            
                                            
                                            <   Rad:RadButton     ID   ="  文本  取消"    ="     ="  错误" 
 
                     span>                                                                      CommandName   ="  <  /td  > 
                                    <  /tr  > 
                                <  /table  >   TELERIK论坛 [

我可能首先要解决该问题(从验证控件中删除验证组,或将验证组添加到您的radcontrols中),然后看看接下来会发生什么.


validations are not working in my asp page why it is? am not getting please help me .
my code is as below

<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>

解决方案

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.


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.


这篇关于验证在我的asp页中没有被唤醒,为什么呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆