<script language="javascript" type="text/javascript">
function padLeft(Cid,ch,num)
{
var elem = document.getElementById(Cid);
var pad = elem.value;
if(!ch) ch="";
while(pad.length < num)
{
pad = ch+ pad;
elem.value= pad;
}
}
</script>
In Code Behind:
On Page Load Call
txtCustItemNr.Attributes.Add("onblur", "padLeft('" + txtCustItemNr.ClientID + "','0',10)")
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment