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.
Pingback: Scholarships For Minorities Fort Hancock
Pingback: silver panda
Pingback: sportsbet
Pingback: Uncover Coupon For Bed Bath And Beyond
I was suggested this web site by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You are wonderful! Thanks!
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..
You made some decent points there. I seemed on the web for the problem and located most people will go along with along with your website.
Thanks for the post.Really thank you! Much obliged.
Heya i am for the first time here. I came across this board and I find It really useful & it helped me out a lot. I hope to give something back and help others like you helped me.
Urgent! i ma searching for serious people that wanna make money on-line http://9oul.com/cash
Nice site, nice and easy on the eyes and great content too.
Keep posting stuff like this i really like it