20-12-2010, 22:59
|
|
|
חבר מתאריך: 11.08.05
הודעות: 230
|
|
תראה בעקרון אתה יכול ליצור לעצמך validation משלך. ואז להשתמש ב Regular Expression
שאתה תיצור שיתאים לך.
הנה לדוגמא:
קוד:
private void SomeValidationFunction(object sender, EventArgs e)
{
Regex regex;
vregex = new Regex(your regular expression)
Control ctrl = (Control)sender;
if (regex.IsMatch(ctrl.Text) || ctrl.Text == "")
{
errProvider.SetError(ctrl, "");
}
else
{
errProvider.SetError(ctrl, "This is not a valid charecters.");
}
מקווה שלא טעיתי בסינטקס.
|