使用 asp.net 在 twilio 中发送短信

sending sms in twilio using asp.net

twilio 与我一起工作,但我需要将消息发送到用户在文本框中输入的号码,例如(文本框的名称是 Phone_no)

  var phone = Phone_no.Text;
               var randomCode = rnd.Next(100000, 1000000);
                Session["codeNo"] = randomCode;

              var message = new TwilioRestClient(AccountSid, AuthToken);

                  var sms = message.SendMessage("Caller ID", "phone" , "Your code is: " + randomCode, "");
                  Console.WriteLine(sms.Sid);
                Response.Redirect("nextpage.aspx");

所以你能帮我吗

试试这个

       var phone = Phone_no.Text;
       var randomCode = rnd.Next(100000, 1000000);
        Session["codeNo"] = randomCode;

      var message = new TwilioRestClient(AccountSid, AuthToken);

          var sms = message.SendMessage("Caller ID", phone , "Your code is: " + randomCode, "");
          Console.WriteLine(sms.Sid);
        Response.Redirect("nextpage.aspx");