The sms message comes as a single string, I want to break the text into different lines but no newline character seems to do the trick.
sdr.Read();
PrisonerStatus = sdr.GetString(0);
LastName = sdr.GetString(1);
MiddleName = sdr.GetString(2);
FirstName = sdr.GetString(3);
Gender = sdr.GetString(4);
DateOfBirth = sdr.GetString(5);
Genotype = sdr.GetString(6);
BloodGroup = sdr.GetString(7);
DateOfCommittal = sdr.GetString(8);
DateOfNaturalExpirationOfSentence = sdr.GetString(9);
ActualDateOfRelease = sdr.GetString(10);
CellInfo = sdr.GetString(11);
Color = sdr.GetString(12);
TribeOrCountryOfOrigin = sdr.GetString(13);
sdr.Close();
if (tokens[2] == "details")
{
//This is where i need the formating so sms receiver sees it as shown below
//PS. Using Ozeki Message server
message = "PrisonerID : " + prisonID + '\n' +
"Full Name : " + LastName + " " + MiddleName + " " + FirstName + '\n' +
"Gender : " + Gender;
SendToOutbox(message);
}
else
{
message = "Unknown transaction code";
output.UpdateDisplay("Error :" + message);
SendToOutbox(message);
goto Label_021C;
}
This should work, use the "
instead of '
message = "PrisonerID : " + prisonID + "\n" +
"Full Name : " + LastName + " " + MiddleName + " " + FirstName + "\n" +
"Gender : " + Gender;
Use this code:
Notice the : @"\0x0A"
message = "PrisonerID : " + prisonID + @"\0x0A" +
"Full Name : " + LastName + " " + MiddleName + " " + FirstName + @"\0x0A" +
"Gender : " + Gender;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With