4
Answers

problem in cs file for validation

Ask a question
Naeem Khan

Naeem Khan

14y
3.3k
1
hello every one, i have very big problem . i want to create cs file for validation where i can make function for numeric validation and character validation when i m created its give me error i m sending u what kind of function i m making on there please check it and reply me if u know easy way to do same thing then plz let me know.......... code// using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace ContaxSoftware { class Validation { public void price_validation(object sender, KeyPressEventArgs e) { int num = e.KeyChar; if (e.KeyChar == '.' || num == 8) { e.Handled = false; } else if (!char.IsDigit(e.KeyChar)) { e.Handled = true; } } thanks in Advcance

Answers (4)
Next Recommended Forum