I think you need to validate the number when keypress event is triggered for the textbox.
Just use Javascript to do that :
function check_double(e,fieldid)
{
var field = document.getElementById(fieldid);
if (!(((e.keyCode>=48)&&(e.keyCode<=57))||(e.keyCode==46)))
{
e.returnValue = false;
e.keyCode=0;
}
if (e.keyCode==46)
{
var patt1=new RegExp("\\.");
var ch =patt1.exec(field);
if(ch==".")
{
e.returnValue = false;
e.keyCode=0;
}
}
}
Now in your Page_Load use this :
TextBox.Attributes.Add("onkeypress", "javascript:check_double(event,'" + TextBox.ClientID + "');");
Just place this for every textbox for which you want to validate Double.
I hope you will like the solution.
Cheers
:rose: