Using Extended Validation of AJAX with ASP.Net Validate Control

In this article, I will explain how to extend validation using AJAX of ASP.Net Validate Control.

  • Download Ajax Toolkit from http://www.asp.net
  • Open Visual Studio
  • Create new website
  • Create a webpage
  • Add some textboxes and button
  • Click on solution explorer
  • Right click
  • Add ASP.Net Folder
  • Select Bin
  • Bin Folder will be created
  • Right Click on Bin folder
  • Select Add Existing Item
  • Browse all binaries downloaded from website mentioned above
  • Add them
  • Now come to .aspx page
  • Add following code at top of the webpage
  • <%@ Register Assembly=”AjaxControlToolkit” Namespace=”AjaxControlToolkit” TagPrefix=”ajaxToolkit” %>
  • Now drag required field validator on textbox like
  • <asp:TextBox ID=”txt_degree_held” runat=”server” Width=”300px”></asp:TextBox>
  • <asp:RequiredFieldValidator ID=”RequiredFieldValidator1″ runat=”server” ControlToValidate=”txt_degree_held” ErrorMessage=”Required” SetFocusOnError=”True”></asp:RequiredFieldValidator>
  • Now add following code
  • <ajaxToolkit:ValidatorCalloutExtender ID=”ValidatorCalloutExtender1″ runat=”server” TargetControlID=”RequiredFieldValidator1″ HighlightCssClass=”blk”></ajaxToolkit:ValidatorCalloutExtender>
  • Now Build it by pressing CRTL+F5

Press button without inputting anything in text you will see out.

Explanation of Extender Control

  • ID represents its unique ID on the webpage
  • Runat obviously says this control will run on server
  • Target Control ID identifies which Validator to access
  • HighlightCssClass displays text according CSS property.

12 thoughts on “Using Extended Validation of AJAX with ASP.Net Validate Control

  1. Pingback: Scholarships For Minorities Fort Hancock

  2. Pingback: silver panda

  3. Pingback: sportsbet

  4. Pingback: Uncover Coupon For Bed Bath And Beyond

  5. hey there and thank you for your information – I have definitely picked up anything new from right here. I did however expertise several technical issues using this site, as I experienced to reload the web site a lot of times previous to I could get it to load properly. I had been wondering if your web host is OK? Not that I am complaining, but slow loading instances times will often affect your placement in google and can damage your high quality score if advertising and marketing with Adwords. Anyway I’m adding this RSS to my email and can look out for much more of your respective exciting content. Make sure you update this again soon..

Leave a Reply