Click here to Skip to main content
15,890,717 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Could I use the Ajax Control,for validating the empty textBox which is in Template field.
XML
<asp:TemplateField HeaderText="KRA Weightage" AccessibleHeaderText="txtKRAWtg" >
                           <ItemTemplate>
                               <asp:Label ID="Label1" runat="server" Text='<%# Bind("KRAWeightage") %>'></asp:Label>
                               <asp:TextBox ID="txtKRAWtg" runat="server" Height="20px" Width="43px" ValidationGroup="KRAWeightage"></asp:TextBox>
                               <asp:RequiredFieldValidator ID="rfdKRAWtg" runat="server"
                                   ErrorMessage="KRA can't empty" ControlToValidate="txtKRAWtg" ValidationGroup="KRAWeightage"></asp:RequiredFieldValidator>
                           </ItemTemplate>



With the Require Field Validator,I would like to use ajax control to show alert message to user.
Posted
Comments
thatraja 27-Nov-10 7:37am    
Why? the validation not working for you now?

1 solution

Thank you for you question. You can use Validation Callout ajax control with required field validator asp.net control. You can fine sample code by the given URL.

http://www.asp.net/ajax/ajaxcontroltoolkit/samples/ValidatorCallout/ValidatorCallout.aspx[^]

Thanks,
Mamun
 
Share this answer
 
Comments
TweakBird 27-Nov-10 12:38pm    
good call
Abdul Quader Mamun 28-Nov-10 2:47am    
Thanks Eswa

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