Hi!. i need textbox that is only entered money value. my code is below:
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (txtpara.Text == "") txtpara.Text = "0";
decimalsayi = Convert.ToDecimal(txtpara.Text);
txtpara.Text = string.Format("{0:#,##}", sayi);
int z = txtpara.SelectionStart;
txtpara.SelectionStart = txtpara.Text.Length;
}
private void txtpara_KeyPress(object sender, KeyPressEventArgs e)
{
if (char.IsDigit(e.KeyChar) == false && char.IsControl(e.KeyChar) == false)
if(e.KeyChar != ',')
e.Handled = true;
}this code works.but problem is : ican't enter fractions of money.How can i correct this. Thanks...
&nb ...
Go to the complete details ...