You are here:ActiveXperts.com > SMS Messaging Server > How to create a new Message > SMS > ASP.NET (C#)
SMS Messaging Server is an SMS messaging framework that enables companies to send, receive and process SMS- and e-mail messages. The framework is designed support virtually any scenario where low-and high volume SMS messaging is required. Use SMS Messaging Server in the following scenarios:
SMS Messaging Server can be well integrated into VBScript environments. This document describes how the SMS Messaging Server can be integrated into your own projects.
In this example we are going to create an ASP.NET (C#) sample page to create an SMS message using the ActiveXperts SMS Messaging Server API. The SMS Messaging Server service will send the message that you created in the database.
You must install and configure Internet Information Services (IIS) before using SMS Messaging Server with ASP .NET. If you don't have IIS installed, use the following steps:
Download ActiveXperts SMS Messaging Server from the ActiveXperts Download Site and start the installation. The installation guides you through the installation process.
Launch Microsoft Visual Studio from the Start menu. Choose 'New' from the 'File' menu and click on 'Web Site'. In the 'Web Site' dialog, select ASP .NET Web Site. Select a name for the application and a name for the solution. Also, select the directory where you want to store the project:
Now that a new project has been created, you must add a reference to the SMS Messaging Server API in the project in order to use the the SMS Messaging Server API objects. To do so, choose 'Add Reference...' from the 'Project' menu. In the 'Add Reference' dialog that pops up, select the 'COM' tab and select the 'ActiveXperts SMS Messaging Server Type Library' as shown in the following picture:
Click 'OK' to close the 'Add Reference' dialog.
On top of your code, type the following line to use the SMS Messaging Server API namespace:
In your Main function, declare and create the following objects:
You should not create an instance of a Message yourself; it is returned by functions like Create, FindFirstMessage, FindNextMessage and Load.
The following code will create a new SMS message in the database. The SMS Messaging Server service will then send this message:
Save the SMS message to the database. The SMS Messaging Server API will send the message.
You can download the full source code of this project from the ActiveXperts FTP site: ftp.activexperts-labs.com/samples/sms-messaging-server. There are many other working samples included with the product or on the FTP site.
The SMS Messaging Server project ships with a set of Microsoft Visual Studio .NET samples. The projects are created with Microsoft Visual Studio 2008.
Users with a later version of Microsoft Visual Studio can open such a project. The Visual Studio Conversion Wizard will guide you through the process of converting the project to the version used.