ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Send SMS to Mobile using Way2SMS in C# and VB.Net<p>Hi&nbsp;<a class="username" rel="nirmal90">nirmal90,</a></p> <p>Using the API https://smsapi.engineeringtgr.com/</p> <p>Step 1: Register on Way2SMS.</p> <ol style="list-style-type: lower-roman;"> <li>Register on way2sms.com if not register.</li> <li>Goto http://way2sms.com and create an account. Therefore you got password on your mobile number. This mobile number and password use in the API.</li> </ol> <p>Step 2: Generate API Key.</p> <p>Step 3: Run API.</p> <p>Refer below code.</p> <p><strong><span style="text-decoration: underline;">Namespaces</span></strong></p> <p><strong>C#</strong></p> <pre class="brush: csharp">using System.IO; using System.Net;</pre> <p><strong>VB.Net</strong></p> <pre class="brush: vb">Imports System.IO Imports System.Net</pre> <p><strong><span style="text-decoration: underline;">Code</span></strong></p> <p><strong>C#</strong></p> <pre class="brush: csharp">private void btnSend_Click(object sender, EventArgs e) { string mobile = &#34;Way2SMSMobileNo&#34;; string password = &#34;Way2SMSPassword&#34;; string text = txtMessage.Text; string number = txtPhoneno.Text; string key = &#34;API_Key&#34;; string url = &#34;https://smsapi.engineeringtgr.com/send/?Mobile=&#34; + mobile + &#34;&amp;Password=&#34; + password + &#34;&amp;Message=&#34; + text + &#34;&amp;To=&#34; + number + &#34;&amp;Key=&#34; + key; ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; ServicePointManager.DefaultConnectionLimit = 9999; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = &#34;GET&#34;; request.ContentType = &#34;application/json&#34;; request.ContentLength = 0; try { WebResponse webResponse = request.GetResponse(); Stream webStream = webResponse.GetResponseStream(); StreamReader responseReader = new StreamReader(webStream); string response = responseReader.ReadToEnd(); responseReader.Close(); } catch (Exception ex) { } }</pre> <p><strong>VB.Net</strong></p> <pre class="brush: vb">Private Sub btnSend_Click(sender As System.Object, e As System.EventArgs) Handles btnSend.Click Dim mobile As String = &#34;Way2SMSMobileNo&#34; Dim password As String = &#34;Way2SMSPassword&#34; Dim text As String = txtMessage.Text Dim number As String = txtPhoneno.Text Dim key As String = &#34;API_Key&#34; Dim url As String = &#34;https://smsapi.engineeringtgr.com/send/?Mobile=&#34; &amp; mobile &amp; &#34;&amp;Password=&#34; &amp; password &amp; &#34;&amp;Message=&#34; &amp; text &amp; &#34;&amp;To=&#34; &amp; number &amp; &#34;&amp;Key=&#34; &amp; key ServicePointManager.Expect100Continue = True ServicePointManager.SecurityProtocol = CType(3072, SecurityProtocolType) ServicePointManager.DefaultConnectionLimit = 9999 Dim request As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest) request.Method = &#34;GET&#34; request.ContentType = &#34;application/json&#34; request.ContentLength = 0 Try Dim webResponse As WebResponse = request.GetResponse() Dim webStream As Stream = webResponse.GetResponseStream() Dim responseReader As StreamReader = New StreamReader(webStream) Dim response As String = responseReader.ReadToEnd() responseReader.Close() Catch ex As Exception End Try End Sub</pre> <p>Note: Here you need to provide the Mobile Number. So do it at your own risk.</p>https://www.aspforums.net:443/Threads/207178/Send-SMS-to-Mobile-using-Way2SMS-in-C-and-VBNet/https://www.aspforums.net:443/Threads/207178/Send-SMS-to-Mobile-using-Way2SMS-in-C-and-VBNet/Wed, 27 Feb 2019 23:23:43 GMT