.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Code Snippets >> Javascript >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Validate Float value in textbox using javasript

Posted By:varun bansal       Posted Date: July 27, 2009    Points: 10    Category: Javascript    URL: http://www.dotnetspark.com  

Validate Float value in textbox using javasript, using this java script code you can validate wrong float value while entering in text box..

Exp of Validate wrong float value..
1. 45.26.5
2. ad.36

on .aspx page

on code behind (.aspx.cs page) :
TextBox5.Attributes.Add("onkeypress", "check_float(event,document.getElementById('" + TextBox5.ClientID + "').value)");

TextBox6.Attributes.Add("onkeypress", "check_float(event,document.getElementById('" + TextBox6.ClientID + "').value)");
Varun Bansal


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend