smssend.aspx.cs: Page_Load(...): does some basic settings. buttonSendOnClick(...): creates and sends the sms from the given data.

Description of the process depicted in Figure 1 above:

Step 1: Create the HTML form In the smssend.aspx file, you create the form that requests the sms data. The Internet user fills in the necessaries. Label and textbox pairs will be displayed. Labels identify the requested data for the Internet user, and they will type it in textboxes. The user will be asked to fill in the Recipient and Message text fields. A multiline textbox is used to inform the Internet user about error(s) or result(s) of sending the message. At first, the error box will be invisible (it will be set in the smssend.aspx.cs file).

smssend.aspx...

Compose a message:

...

In the "protected void Page_Load(object sender, EventArgs e)" procedure (in smssend.aspx.cs), you set the width of textboxes and the error box height in rows. The text of the error box is red, and the first is invisible and empty. If ? using the net browser ? the page is downloaded for the first time, fill in the recipient and message boxes with predefined texts.

Step 2: Processing data coming from the HTML form After filling in the fields and clicking the Send button , the ASP server receives the information about the form. In the smssend.aspx.cs file, the "protected void buttonSendOnClick(object sender, EventArgs e)" procedure is called. At the beginning of the procedure, check the data of the textbox fields. The Recipient box is mandatory. If it is empty, the processing will be aborted, and the Internet user will be shown the error. If the checking is successful, you will create the URL that will tell the Ozeki NG - SMS Gateway Server the requested information. We need the following: the URL of the computer running Ozeki NG - SMS Gateway Server the default URL is http://127.0.0.1/httpapi (127.0.0.1 means that Ozeki NG - SMS Gateway Server is installed on the same computer on which the ASP.NET script is running), the port number on which the server listens, the username, which is authorized to log in to the Ozeki NG - SMS Gateway Server and to send messages (the default username is admin), the user's password (the default is abc123), the message type (the default is SMS:TEXT), the recipient and the message data. The following values must be URL-encoded: username, password, recipient and message data.

Step 3: Sending a request to the SMS Gateway and receiving the answer In the code you send a request to the Ozeki NG - SMS Gateway Server with the data of the message. It will create an SMS and send it to the recipient (mobile user) using a GSM modem/phone (if the given data is correct) and send you the result. You create a request to the Ozeki NG - SMS Gateway Server at the URL created above. When it is done, you will receive a response from the Ozeki NG - SMS Gateway Server. The information will be retrieved from it and shown to the Internet user. Whatever problem you have, it is because the Ozeki NG - SMS Gateway Server is not running at the moment of sending data.