
Şekil 1
1- ReqularExpressionValidator ErrorMessage (hata verirken çıkacak olan yazı) ını Hatalı mail girişi yazısını girin.

Şekil 2
3- Şimdi TextBox nesnesimizin kontrolüne sıra geldi. ReqularExpressionValidator nesnesine ait Properties kısmındaki ControlToValidate özelliğinden TextBox nesnesini seçin.(Şekil 3)

Şekil 3
4- ReqularExpressionValidator nesnesi TextBoxta “@ “ve” . “ işaretlerini kontrol edecektir.

Şekil 4
Default.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//RegularExpressionValidator hata mesajı girişi
RegularExpressionValidator1.ErrorMessage = "Hatalı mail girişi.";
Button1.Text = "Kontrol Et";
}
}
Bir makalenin daha sonuna geldik. Bir sonraki makalede görüşmek dileğiyle. Hoşçakalın. Bahadır ŞAHİN
0 comments:
Yorum Gönder