SMS System Project in ASP.NET
SMS System Project:
This application creates an ASP.NET website that allows the end users to send SMSs to mobile phones using the web. The application uses one of the free SMS-sending APIs that are widely available on the web. The steps involved in the creation of the SMS system in ASP.NET are:
1. Searching the free SMS sending APIs
2. Creating the website
3. Designing the website
4. Adding code to the C# file (.aspx.cs)
5. Running the application
Searching the free SMS sending APIs:
There are numerous free SMS sending websites available on the web. Some of these sites also provide access to APIs that the programmers can use to add SMS sending capabilities to their websites.
To integrate SMS sending capabilities to your website, you need to search for a free SMS sending provider on the Web and use its HTTP API for sending the SMS. The actual message can be sent by calling a URL via HTTP GET or POST.
Here is a sample URL that needs to be sent to the SMS service provider:
In the above URL:
domainname: It is the domain name of the SMS service provider.
username: It is the user name registered with the provider.
password: It is a password value.
number: It is a number on which SMS is to be sent.
message: Message is the SMS message that needs to be sent.
optional: It is the optional parameter such as error code, message type, etc.
Creating the website:
To create the ASP.NET website, you need to perform the following steps:
1. Open Microsoft Visual Studio and select File -> Website to display the New Website dialogue box.
2. Select the ASP.NET empty website option Templates -> Visual C# section and enter the name of the website next to the web location field.
3. Click OK to create the website. A new project gets added to the Solution Explorer.
4. Right Click the new project node in the Solution Explorer and select Add -> Add New Item to display Add new site
5. Select the Web Form option and click the Add button to open the Default.aspx page in Visual Studio.
Designing the website:
To design the main page of the new project, you need to switch to the Design view of the Default.aspx page and add appropriate controls including title, mobile number field, message box, send button, etc.
Adding code to the C# file:
To add the SMS functionality to the default.aspx page, you need to add the relevant code in the corresponding C# file. Open the default.aspx.cs file from the Solution Explorer and add the following code to it.
Running the application:
Press F5 to start building the website, the default.aspx web page appears.
Now, enter a mobile number and a message in the respective text fields and click the send SMS button to send the SMS. A confirmation message indicates whether the message has been successfully sent or not.