New Posts New Posts RSS Feed: Validation on TextBox
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Validation on TextBox

 Post Reply Post Reply Page  <12
Author
bala View Drop Down
Groupie
Groupie
Avatar

Joined: 18-Aug-2010
Location: Brazil
Posts: 54
Post Options Post Options   Quote bala Quote  Post ReplyReply Direct Link To This Post Topic: Validation on TextBox
    Posted: 14-Sep-2010 at 11:25am
Hi Densk

 private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            STUDENT stud = new STUDENT();
            stud.NAME = txtName.Text;
            stud.PHONE = Convert.ToInt64(txtPhone.Text);
            mgr.AddEntity(stud);
            mgr.SaveChangesAsync();

           
        }

Now this my code for save but How to fire that validation
i want make sure Name can not be empty and Phone no should be Number..
And want to show proper error message.

Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 14-Sep-2010 at 3:25pm
You need to implement a class that implements an IVerifierProvider interface. Please take a look at the solution I sent you.
Back to Top
bala View Drop Down
Groupie
Groupie
Avatar

Joined: 18-Aug-2010
Location: Brazil
Posts: 54
Post Options Post Options   Quote bala Quote  Post ReplyReply Direct Link To This Post Posted: 15-Sep-2010 at 9:05am
Hi Densk

I look out your solution and try to solve problem
I am sending my solution would you check out where I am doing mistek

uploads/896/valid.zip

Thanks
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down