title: text box decimal format fixing
body: <p>I have a simple text box and I am entering number value to this.And i want to format the number value to two decimal places.Like If i enter the 10 in the text box and after pressing entering or leaving textbox it should be converted into 10.00.Please tell me if there exist any possibility to do this using javascript or vb.net or asp.net property of textbox.I already tried in JavaScript on enter key or tab key press but it convert it into 10.00 each time when i press the enter or tab.here is code</p>
  
  <pre><code>//Make Formatting with .00
  
  
  document.onkeydown = function disableKeys() {
  
      if( typeof event != 'undefined' ) {
        if( (event.keyCode == 9) ||
            (event.keyCode == 13) ) {
            var a;
            var b;
            a=parseFloat(document.getElementById('txtpkrusd').value,10);
            b=parseFloat(document.getElementById('txtRatelb').value,10);
            document.getElementById('txtpkrusd').value=formatNumber(a);         
            document.getElementById('txtRatelb').value=formatNumber(b);         
  
        }
      };
  };
  </code></pre>