添加Web 引用
http://localhost/myweb/service.asmx
默认是localhost;
private void button1_Click(object sender, EventArgs e)
{
localhost.SecurityWebService ser = new localhost.SecurityWebService();
localhost. SecurityInfo info=ser.GetSecurityInfo(textBox1.Text);
textBox2.Text = info.CompanyName;
textBox3.Text = info.Price.ToString();
}