protected void Page_Load(object sender, EventArgs e)
    {
        object mobile = Request.Params["mobile"];

        //object valid=Request.Params["valid"];
        Response.Expires = -1;
        Response.Clear();
        Response.ContentEncoding = Encoding.UTF8;
        Response.ContentType     = "application/json";


        if (mobile != null)
        {
            // Session["orderid"]
            //System.Threading.Thread.Sleep(1000);
            //GobalTools.SendValidSms(mobile.ToString());

            if (GobalTools.SendValidSms(mobile.ToString(), Session["orderid"].ToString()))
            {
                Response.Write("{\"result\":\"Success\"}");
            }
            else
            {
                // Response.Write("{\"result\":\"Success\"}");
                Response.Write("{\"result\":\"Fail\"}");
            }

            /*
             * Response.Write("{\"result\":\"Success\"}");
             * * */
        }
        else
        {
            Response.Write("{\"result\":\"Fail\"}");
        }
        Response.Flush();
        Response.End();
    }
Example #2
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     GobalTools.SendValidSms("15814584509", "123021321AE");
 }