Ejemplo n.º 1
0
 public static string TestAjax()
 {
     //  lblName.Text = "Hello, Async";
     WebForm1 webForm = new WebForm1();
     if (webForm.lblName != null)
     {
         webForm.lblName.Text = "Hello,Async";
     }
        Thread.Sleep(3000);
     return "true";
 }
Ejemplo n.º 2
0
        [WebMethod]//从前台调用必须是static方法
        public static string TestAjax()
        {
            //  lblName.Text = "Hello, Async";
            WebForm1 webForm = new WebForm1();

            if (webForm.lblName != null)
            {
                webForm.lblName.Text = "Hello,Async";
            }
            Thread.Sleep(3000);
            return("true");
        }