Exemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string name = TextBox1.Text;

            string pass        = TextBox4.Text;
            string nationality = TextBox5.Text;

            var serv = new WebService1();

            if (TextBox2.Text != "" && TextBox3.Text != "")
            {
                int id  = Convert.ToInt16(TextBox2.Text);
                int age = Convert.ToInt16(TextBox3.Text);
                serv.AddStudent(id, name, nationality, age, pass);
            }
        }