string message = "Hi Your Payment |payment| is Due on Date |date| , So Make Payment as soon as possible.";
now,
text between | and | is refer Column Name of Datatable, and i want to put data from datatable in it.
how can i ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Feb 17, 2015, 9:45 AM
VulpesPosted Feb 18, 2015, 10:57 AM
I've just quickly thrown together this console application to show you what I mean:
Console.WriteLine();
The output is:
Vasu GadhiyaPosted Feb 18, 2015, 2:36 AM
first substring With | Like --> "Hi Your Payment", "Paymnet", "is Due on Date" ......
After I Substring Withing | --> "Payment", "Date" ....
Match Both Array and put in first array {0}, {1} .....
after i add as you shown..
Thanks,
Vasu GadhiyaPosted Feb 17, 2015, 11:25 PM
but Problem is in Message String,
User can enter its own message,
ex .
string message = "Hi Your Payment |payment| is Due on Date |date| , So Make Payment as soon as possible.";
string message = "Hello Mr. |CustomerName| Your Payment |payment| is Due.";
How To Substring Every Text Between |,| and get data from datatable.row[0].
thanks,