Exemplo n.º 1
0
        protected void btnSay_Click(object sender, EventArgs e)
        {
            ServiceReference1.WebService1SoapClient serv = new ServiceReference1.WebService1SoapClient();
            string say = serv.HelloWorld();

            lbSay.Text = say;
        }
Exemplo n.º 2
0
 protected void btnConvert_Click(object sender, EventArgs e)
 {
     try
     {
         double from         = double.Parse(txtFrom.Text);
         string fromCurrency = ddlFromCurrency.SelectedValue;
         string toCurrency   = ddlToCurrency.SelectedValue;
         ServiceReference1.WebService1SoapClient serv = new ServiceReference1.WebService1SoapClient();
         double to = serv.Convert(from, fromCurrency, toCurrency);
         txtTo.Text = to.ToString();
     }
     catch
     {
         txtTo.Text = "You must input number";
     }
 }