public void Form1_Load(Object sender, EventArgs e)
{
// Other initialization code
mtxtEmailID.Mask = "..........";
什么应该是掩码类型代替点
mtxtEmailID.MaskInputRejected += new MaskInputRejectedEventHandler(mtxtEmailID_MaskInputRejected)
}
void mtxtEmailID_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
if(!Regex.IsMatch(txtEmailID.Text, "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"))
这里的正则表达式给了我错误,让我知道什么是正确的电子邮件验证。
{
toolTip1.ToolTipTitle = "Invalid Input";
toolTip1.Show("Enter valid email address", mtxtEMailID);
}
}