Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         proxy    = new ServiceReference1.Service1Client();
         msg.Text = proxy.GetData(11);
     }
 }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //情景1 一般页面错误
            //dynamic i = 0;
            //string.Format("You entered: {0}", 1 / i);


            //情景2 wcf调用出错
            ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
            client.Using(() =>
            {
                var result = client.GetData(11111);
            });


            //WCFHelper.Using<ServiceReference1.Service1Client>((item) => {
            //   var re= item.GetData(1);
            //});
        }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     WebApplication1.ServiceReference1.Service1Client clt = new ServiceReference1.Service1Client();
     res = clt.GetData(3);
 }
Пример #4
0
 protected void btnShowMessage_Click(object sender, EventArgs e)
 {
     proxy    = new ServiceReference1.Service1Client();
     msg.Text = proxy.GetData(11);
 }
Пример #5
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
     Label1.Text = client.GetData(Convert.ToInt32(TextBox1.Text));
 }